public function testGetPhp() { $superglobals = new atoum\superglobals(); $superglobals->_SERVER['_'] = $php = uniqid(); $builder = new scripts\builder(uniqid()); $builder->setSuperglobals($superglobals); $this->assert->string($builder->getPhpPath())->isEqualTo($php); unset($superglobals->_SERVER['_']); $builder = new scripts\builder(uniqid()); $builder->setSuperglobals($superglobals); $this->assert->exception(function () use($builder) { $builder->getPhpPath(); })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime'); $builder->setPhpPath($php = uniqid()); $this->assert->string($builder->getPhpPath())->isEqualTo($php); }
public function testSetPhpPath() { $this->if($builder = new testedClass(uniqid()))->then->object($builder->setPhpPath($phpPath = uniqid()))->isIdenticalTo($builder)->string($builder->getPhpPath())->isIdenticalTo($phpPath); }