Exemplo n.º 1
0
 public function test__construct()
 {
     $this->if($field = new testedClass($projectName = uniqid(), $destinationDirectory = uniqid()))->then->string($field->getProjectName())->isEqualTo($projectName)->string($field->getDestinationDirectory())->isEqualTo($destinationDirectory)->string($field->getTemplatesDirectory())->isEqualTo(atoum\directory . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'coverage')->object($field->getPrompt())->isEqualTo(new prompt())->object($field->getTitleColorizer())->isEqualTo(new colorizer())->object($field->getCoverageColorizer())->isEqualTo(new colorizer())->object($field->getUrlPrompt())->isEqualTo(new prompt())->object($field->getUrlColorizer())->isEqualTo(new colorizer())->object($field->getPhp())->isEqualTo(new atoum\php())->object($field->getAdapter())->isEqualTo(new atoum\adapter())->object($field->getLocale())->isEqualTo(new locale())->object($field->getTemplateParser())->isInstanceOf('mageekguy\\atoum\\template\\parser')->variable($field->getCoverage())->isNull()->array($field->getSrcDirectories())->isEmpty()->array($field->getEvents())->isEqualTo(array(atoum\runner::runStop));
 }
Exemplo n.º 2
0
 public function testSetAdapter()
 {
     $this->if($field = new coverage\html(uniqid(), uniqid()))->then->object($field->setAdapter($adapter = new atoum\adapter()))->isIdenticalTo($field)->object($field->getAdapter())->isIdenticalTo($adapter)->object($field->setAdapter())->isIdenticalTo($field)->object($field->getAdapter())->isNotIdenticalTo($adapter)->isEqualTo(new atoum\adapter());
 }