public function testOnAppDownloadedChangeAccessToFiles()
 {
     if (defined('PHP_WINDOWS_VERSION_BUILD')) {
         $this->markTestSkipped('Will not run on OS Windows');
     } else {
         $file1 = $this->event->getPath() . 'AnimeDB';
         $file2 = $this->event->getPath() . 'app/console';
         $this->fs->mkdir($this->event->getPath() . 'app');
         touch($file1);
         touch($file2);
         chmod($file1, 0666);
         chmod($file2, 0666);
         $this->listener->onAppDownloadedChangeAccessToFiles($this->event);
         // test
         $this->assertEquals(0755, fileperms($file1) & 0777);
         $this->assertEquals(0755, fileperms($file2) & 0777);
     }
 }
 /**
  * {@inheritDoc}
  */
 protected function setUp()
 {
     $this->adminGenerator = new AdminGenerator($this->createModelManagerMock(), __DIR__ . '/../../Resources/skeleton');
     $this->bundleMock = $this->createBundleMock();
     $this->bundlePath = $this->bundleMock->getPath();
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     $this->controllerGenerator = new ControllerGenerator(__DIR__ . '/../../Resources/skeleton');
     $this->bundleMock = $this->createBundleMock();
     $this->bundlePath = $this->bundleMock->getPath();
 }
Exemple #4
0
 /**
  * test that initialize sets the path
  *
  * @return void
  */
 public function testGetPath()
 {
     $this->assertPathEquals(ROOT . DS . 'tests' . DS . 'Fixture/', $this->Task->getPath());
 }
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage File config key does not exist.
  */
 public function testGetPathException()
 {
     $fileKey = 'not_existing';
     $this->configFilePool->getPath($fileKey);
 }