Ejemplo n.º 1
0
 public function checkFolderWrite(FolderEvent $event)
 {
     $folder = $event->getFolder();
     if (!$this->adapter->isFolderWritable($folder)) {
         $this->dispatchDenyEvent($folder);
         throw $this->createAccessDeniedException($folder, 'write');
     }
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function eventShouldInitializeCorrectly()
 {
     $folder = $this->getMockedFolder();
     $event = new FolderEvent($folder);
     $folder2 = $event->getFolder();
     $this->assertSame($folder, $folder2);
     $folder3 = $event->getIdentifiable();
     $this->assertSame($folder, $folder3);
 }