useConfigFile() public method

public useConfigFile ( $path )
Beispiel #1
0
 public function testUseConfigFile()
 {
     $this->if($runner = new testedClass(uniqid()))->and($runner->setLocale($locale = new \mock\mageekguy\atoum\locale()))->then->exception(function () use($runner, &$file) {
         $runner->useConfigFile($file = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\includer\\exception')->hasMessage('Unable to find configuration file \'' . $file . '\'')->mock($locale)->call('_')->withArguments('Unable to find configuration file \'%s\'')->once()->if($configFile = stream::get())->and($configFile->file_get_contents = '<?php $runner->disableCodeCoverage(); ?>')->then->boolean($runner->getRunner()->codeCoverageIsEnabled())->isTrue()->object($runner->useConfigFile((string) $configFile))->isIdenticalTo($runner)->boolean($runner->getRunner()->codeCoverageIsEnabled())->isFalse();
 }