Example #1
0
 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);
     }
 }
Example #2
0
 /**
  * Change access to executable files.
  *
  * @param Downloaded $event
  */
 public function onAppDownloadedChangeAccessToFiles(Downloaded $event)
 {
     if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
         $this->fs->chmod([$event->getPath() . '/AnimeDB', $event->getPath() . '/app/console'], 0755);
     }
 }
Example #3
0
 public function testGetOldPackage()
 {
     $this->assertEquals($this->old_package, $this->event->getOldPackage());
 }