/**
  * @test
  */
 public function eventInitializesCorrectly()
 {
     $identifiable = $this->getMock('Xi\\Filelib\\Identifiable');
     $event = new IdentifiableEvent($identifiable);
     $identifiable2 = $event->getIdentifiable();
     $this->assertSame($identifiable, $identifiable2);
 }
Esempio n. 2
0
 public function __construct(Folder $folder)
 {
     parent::__construct($folder);
 }
Esempio n. 3
0
 public function __construct(File $file)
 {
     parent::__construct($file);
 }
Esempio n. 4
0
 public function __construct(Resource $resource)
 {
     parent::__construct($resource);
 }
Esempio n. 5
0
 /**
  * @param IdentifiableEvent $event
  */
 public function onDelete(IdentifiableEvent $event)
 {
     $this->remove($event->getIdentifiable());
 }
Esempio n. 6
0
 /**
  * @param IdentifiableEvent $event
  */
 public function onCreate(IdentifiableEvent $event)
 {
     $this->save($event->getIdentifiable());
 }