/** * Add a project to watch * * @param \Testy\Project $oProject * * @return $this */ public function add(\Testy\Project $oProject) { $sName = $oProject->getName(); if (empty($this->_aStack[$sName]) === true or $oProject->getProjectHash() !== $this->_aStack[$sName]->getProjectHash()) { if ($oProject->isEnabled() === true) { $this->_aStack[$sName] = $oProject; $oProject->notify(\notifyy\Notifyable::INFO, \Testy\Project\Builder::INFO); } elseif (empty($this->_aStack[$sName]) !== true) { unset($this->_aStack[$sName]); } } return $this; }
/** * Test calling the notifiy method * * @depends testAddNotifier */ public function testNotify() { $this->assertInstanceOf('\\Testy\\Project', $this->_object->notify('', '')); }