示例#1
0
 public function testSetGetActions()
 {
     $action1 = new CreationAction();
     $action2 = new Injector();
     $action1->setCallback(function ($object) {
         var_dump($object);
     });
     $action2->setMethodName('amethod');
     $actions = array($action1, $action2);
     $this->descriptor->setActions($actions);
     $this->assertEquals(array($action1, $action2), $this->descriptor->getActions());
 }
示例#2
0
 public function testSetMethodName()
 {
     $this->injector->setMethodName('callbackSetMethodName');
     $this->injector->execute($this);
     $this->assertTrue($this->methodSet);
 }