mageekguy\atoum\tests\units\test\engines\concurrent::testRun PHP Method

testRun() public method

public testRun ( )
    public function testRun()
    {
        $this->if($engine = new testedClass())->and($engine->setPhp($php = new \mock\mageekguy\atoum\php()))->then->object($engine->run($test = new \mock\mageekguy\atoum\test()))->isIdenticalTo($engine)->if($test->getMockController()->getCurrentMethod = $method = uniqid())->and($test->getMockController()->getPath = $testPath = uniqid())->and($test->getMockController()->getPhpPath = $phpPath = uniqid())->and($test->getMockController()->codeCoverageIsEnabled = false)->and($test->getMockController()->getBootstrapFile = null)->and($test->setXdebugConfig($xdebugConfig = uniqid()))->and($this->calling($php)->run->throw = $exception = new atoum\php\exception())->and($this->function->getenv = false)->and($this->function->ini_get = 0)->then->exception(function () use($engine, $test) {
            $engine->run($test);
        })->isIdenticalTo($exception)->if($this->calling($php)->run = $php)->then->object($engine->run($test))->isIdenticalTo($engine)->mock($php)->call('run')->withArguments('<?php ' . 'ob_start();' . 'require \'' . atoum\directory . '/classes/autoloader.php\';' . 'require \'' . $testPath . '\';' . '$test = new ' . get_class($test) . '();' . '$test->setLocale(new ' . get_class($test->getLocale()) . '(' . $test->getLocale()->get() . '));' . '$test->setPhpPath(\'' . $phpPath . '\');' . '$test->disableCodeCoverage();' . 'ob_end_clean();' . 'mageekguy\\atoum\\scripts\\runner::disableAutorun();' . 'echo serialize($test->runTestMethod(\'' . $method . '\')->getScore());')->twice()->call('__set')->withArguments('XDEBUG_CONFIG', $xdebugConfig)->twice()->if($this->calling($test)->getAutoloaderFile = $autoloaderFile = uniqid())->then->object($engine->run($test))->isIdenticalTo($engine)->mock($php)->call('run')->withArguments('<?php ' . 'ob_start();' . 'require \'' . atoum\directory . '/classes/autoloader.php\';' . '$includer = new mageekguy\\atoum\\includer();' . 'try { $includer->includePath(\'' . $autoloaderFile . '\'); }' . 'catch (mageekguy\\atoum\\includer\\exception $exception)' . '{ die(\'Unable to include autoloader file \\\'' . $autoloaderFile . '\\\'\'); }' . 'require \'' . $testPath . '\';' . '$test = new ' . get_class($test) . '();' . '$test->setLocale(new ' . get_class($test->getLocale()) . '(' . $test->getLocale()->get() . '));' . '$test->setPhpPath(\'' . $phpPath . '\');' . '$test->disableCodeCoverage();' . 'ob_end_clean();' . 'mageekguy\\atoum\\scripts\\runner::disableAutorun();' . 'echo serialize($test->runTestMethod(\'' . $method . '\')->getScore());')->once->if($this->calling($test)->getBootstrapFile = $bootstrapFile = uniqid())->then->object($engine->run($test))->isIdenticalTo($engine)->mock($php)->call('run')->withArguments('<?php ' . 'ob_start();' . 'require \'' . atoum\directory . '/classes/autoloader.php\';' . '$includer = new mageekguy\\atoum\\includer();' . 'try { $includer->includePath(\'' . $autoloaderFile . '\'); }' . 'catch (mageekguy\\atoum\\includer\\exception $exception)' . '{ die(\'Unable to include autoloader file \\\'' . $autoloaderFile . '\\\'\'); }' . '$includer = new mageekguy\\atoum\\includer();' . 'try { $includer->includePath(\'' . $bootstrapFile . '\'); }' . 'catch (mageekguy\\atoum\\includer\\exception $exception)' . '{ die(\'Unable to include bootstrap file \\\'' . $bootstrapFile . '\\\'\'); }' . 'require \'' . $testPath . '\';' . '$test = new ' . get_class($test) . '();' . '$test->setLocale(new ' . get_class($test->getLocale()) . '(' . $test->getLocale()->get() . '));' . '$test->setPhpPath(\'' . $phpPath . '\');' . '$test->disableCodeCoverage();' . 'ob_end_clean();' . 'mageekguy\\atoum\\scripts\\runner::disableAutorun();' . 'echo serialize($test->runTestMethod(\'' . $method . '\')->getScore());')->once;
    }