public function testGetSubject() { // this is almost the same test than getComponent $this->if($action = new TestedModel())->variable($action->getComponent('subject'))->isNull()->when($action->addComponent('subject', 'chuckNorris', '\\Spy\\Timeline\\Model\\ActionComponent'))->string($action->getComponent('subject'))->isEqualTo('chuckNorris')->if($this->mockClass('\\Spy\\Timeline\\Model\\ComponentInterface', '\\Mock'))->and($component = new \Mock\ComponentInterface())->when($action->addComponent('subject', $component, '\\Spy\\Timeline\\Model\\ActionComponent'))->object($action->getComponent('subject'))->isIdenticalTo($component); }