コード例 #1
0
ファイル: DescriptorTest.php プロジェクト: codeblanche/depend
 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
ファイル: InjectorTest.php プロジェクト: codeblanche/depend
 public function testSetMethodName()
 {
     $this->injector->setMethodName('callbackSetMethodName');
     $this->injector->execute($this);
     $this->assertTrue($this->methodSet);
 }