コード例 #1
0
ファイル: builder.php プロジェクト: ronan-gloo/atoum
 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);
 }
コード例 #2
0
 public function testSetPhpPath()
 {
     $this->if($builder = new testedClass(uniqid()))->then->object($builder->setPhpPath($phpPath = uniqid()))->isIdenticalTo($builder)->string($builder->getPhpPath())->isIdenticalTo($phpPath);
 }