Ejemplo n.º 1
0
 public function testClear()
 {
     $this->if($adapter = new atoum\test\adapter())->if($adapter->fopen = false)->and($file = new testedClass(null, $adapter))->and($adapter->resetCalls())->then->exception(function () use($file) {
         $file->clear();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to open file \'' . $file->getFilename() . '\'')->if($adapter->fopen = $resource = uniqid())->and($adapter->flock = true)->and($adapter->ftruncate = false)->and($adapter->fclose = function () {
     })->and($adapter->resetCalls())->then->exception(function () use($file) {
         $file->clear();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to truncate file \'' . $file->getFilename() . '\'')->adapter($adapter)->call('fopen')->withArguments($file->getFilename(), 'c')->once()->call('flock')->withArguments($resource, LOCK_EX)->once()->if($adapter->ftruncate = true)->then->object($file->clear())->isIdenticalTo($file)->adapter($adapter)->call('fopen')->withArguments($file->getFilename(), 'c')->once()->call('ftruncate')->withArguments($resource, 0)->after($this->adapter($adapter)->call('flock')->withArguments($resource, LOCK_EX))->twice();
 }
Ejemplo n.º 2
0
 public function testExportRepository()
 {
     $this->if($adapter = new atoum\test\adapter(), $adapter->extension_loaded = true, $svn = new \mock\mageekguy\atoum\scripts\builder\vcs\svn($adapter), $svn->getMockController()->cleanWorkingDirectory = $svn)->then->exception(function () use($svn) {
         $svn->exportRepository(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to export repository, repository url is undefined')->adapter($adapter)->call('svn_auth_set_parameter')->withArguments(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true)->never()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_USERNAME, $svn->getUsername())->never()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $svn->getPassword())->never()->call('svn_checkout')->never()->if($svn->setRepositoryUrl($repositoryUrl = uniqid())->setWorkingDirectory($workingDirectory = __DIR__), $adapter->resetCalls(), $adapter->svn_checkout = false, $adapter->svn_auth_set_parameter = function () {
     })->then->exception(function () use($svn) {
         $svn->exportRepository();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to checkout repository \'' . $repositoryUrl . '\' in directory \'' . $workingDirectory . '\'')->adapter($adapter)->call('svn_auth_set_parameter')->withArguments(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true)->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_USERNAME, $svn->getUsername())->never()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $svn->getPassword())->never()->call('svn_checkout')->withArguments($svn->getRepositoryUrl(), $workingDirectory, $svn->getRevision())->once()->mock($svn)->call('cleanWorkingDirectory')->once()->if($svn->setUsername(uniqid())->getMockController()->resetCalls(), $adapter->resetCalls())->then->exception(function () use($svn) {
         $svn->exportRepository();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to checkout repository \'' . $repositoryUrl . '\' in directory \'' . $workingDirectory . '\'')->adapter($adapter)->call('svn_auth_set_parameter')->withArguments(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true)->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_USERNAME, $svn->getUsername())->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $svn->getPassword())->never()->call('svn_checkout')->withArguments($svn->getRepositoryUrl(), $workingDirectory, $svn->getRevision())->once()->mock($svn)->call('cleanWorkingDirectory')->once()->if($svn->setPassword(uniqid())->getMockController()->resetCalls(), $adapter->resetCalls())->then->exception(function () use($svn) {
         $svn->exportRepository();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to checkout repository \'' . $repositoryUrl . '\' in directory \'' . $workingDirectory . '\'')->adapter($adapter)->call('svn_auth_set_parameter')->withArguments(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true)->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_USERNAME, $svn->getUsername())->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $svn->getPassword())->once()->call('svn_checkout')->withArguments($svn->getRepositoryUrl(), $workingDirectory, $svn->getRevision())->once()->mock($svn)->call('cleanWorkingDirectory')->once()->if($svn->getMockController()->resetCalls(), $adapter->svn_checkout = true, $adapter->resetCalls())->then->object($svn->exportRepository())->isIdenticalTo($svn)->adapter($adapter)->call('svn_auth_set_parameter')->withArguments(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true)->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_USERNAME, $svn->getUsername())->once()->call('svn_auth_set_parameter')->withArguments(SVN_AUTH_PARAM_DEFAULT_PASSWORD, $svn->getPassword())->once()->call('svn_checkout')->withArguments($svn->getRepositoryUrl(), $workingDirectory, $svn->getRevision())->once()->mock($svn)->call('cleanWorkingDirectory')->once();
 }
Ejemplo n.º 3
0
 public function testRun()
 {
     $this->if($php = new testedClass($phpPath = uniqid(), $adapter = new atoum\test\adapter()))->and($adapter->proc_open = false)->then->exception(function () use($php, &$code) {
         $php->run($code = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\cli\\command\\exception')->hasMessage('Unable to run \'' . $php . '\'')->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once()->if($php = new testedClass($phpPath = uniqid(), $adapter))->and($code = uniqid())->and($adapter->proc_open = function ($command, $descriptors, &$streams) use(&$phpResource, &$stdin, &$stdout, &$stderr) {
         $streams = array($stdin = uniqid(), $stdout = uniqid(), $stderr = uniqid);
         return $phpResource = uniqid();
     })->and($adapter->fwrite = strlen($code))->and($adapter->fclose = null)->and($adapter->stream_set_blocking = null)->then->object($php->run($code))->isIdenticalTo($php)->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once()->call('fwrite')->withArguments($stdin, $code, strlen($code))->once()->call('fclose')->withArguments($stdin)->once()->call('stream_set_blocking')->withArguments($stdout)->once()->call('stream_set_blocking')->withArguments($stderr)->once()->if($php = new testedClass($phpPath = uniqid(), $adapter))->and($adapter->resetCalls())->and($adapter->fwrite[1] = 4)->and($adapter->fwrite[2] = strlen($code) - 4)->then->object($php->run($code))->isIdenticalTo($php)->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once()->call('fwrite')->withArguments($stdin, $code, strlen($code))->once()->call('fwrite')->withArguments($stdin, substr($code, 4), strlen($code) - 4)->once()->call('fclose')->withArguments($stdin)->once()->call('stream_set_blocking')->withArguments($stdout)->once()->call('stream_set_blocking')->withArguments($stderr)->once()->if($php = new testedClass($phpPath = uniqid(), $adapter))->and($php->addOption('firstOption'))->then->object($php->run($code))->isIdenticalTo($php)->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once()->if($php = new testedClass($phpPath = uniqid(), $adapter))->and($php->addOption('firstOption'))->and($php->addOption('secondOption', 'secondOptionValue'))->then->object($php->run($code))->isIdenticalTo($php)->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once()->if($php = new testedClass($phpPath = uniqid(), $adapter))->and($php->addArgument($argument1 = uniqid()))->and($php->addArgument($argument2 = uniqid()))->then->object($php->run($code))->isIdenticalTo($php)->adapter($adapter)->call('proc_open')->withArguments((string) $php, array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w')), array())->once();
 }
Ejemplo n.º 4
0
 public function testWrite()
 {
     $this->if($handle = uniqid())->and($adapter = new atoum\test\adapter())->and($adapter->fopen = function () use($handle) {
         return $handle;
     })->and($adapter->fclose = function () {
     })->and($adapter->fwrite = function () {
     })->and($adapter->is_writable = function () {
         return true;
     })->and($file = new writers\file(null, $adapter))->and($adapter->resetCalls())->then->object($file->write($string = uniqid()))->isIdenticalTo($file)->adapter($adapter)->call('dirname')->withArguments('atoum.log')->once()->call('is_writable')->withArguments('.')->once()->call('fopen')->withArguments('atoum.log', 'w')->once()->call('fwrite')->withArguments($handle, $string)->once()->object($file->write($string = uniqid() . "\n"))->isIdenticalTo($file)->adapter($adapter)->call('fwrite')->withArguments($handle, $string)->once()->if($adapter->is_null = function () {
         return false;
     })->then->object($file->write($string = uniqid()))->isIdenticalTo($file)->adapter($adapter)->call('fwrite')->withArguments($handle, $string)->once();
 }
Ejemplo n.º 5
0
 public function testTagVersion()
 {
     $this->if($tagger = $this->newTestedInstance($adapter = new atoum\test\adapter()), $adapter->is_dir = true, $adapter->mkdir = function () {
     })->then->exception(function () use($tagger) {
         $tagger->tagVersion(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Unable to tag, src directory is undefined')->if($this->testedInstance->setSrcDirectory($srcDirectory = uniqid()))->then->exception(function () use($tagger) {
         $tagger->tagVersion(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Unable to tag, version is undefined')->if($tagger->setVersion($version = uniqid())->setSrcIteratorInjector(function ($directory) {
     }))->then->exception(function () use($tagger) {
         $tagger->tagVersion(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Unable to tag, src iterator injector does not return an iterator')->if($srcIterator = new \arrayIterator(array($file1 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename1 = uniqid()), $file2 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename2 = uniqid()), $file3 = $srcDirectory . \DIRECTORY_SEPARATOR . ($basename3 = uniqid()))), $this->testedInstance->setSrcIteratorInjector(function ($directory) use($srcIterator) {
         return $srcIterator;
     }), $adapter->file_get_contents[1] = ($file1Part1 = uniqid()) . '\'$Rev: ' . rand(1, PHP_INT_MAX) . ' $\'' . ($file1Part2 = uniqid()), $adapter->file_get_contents[2] = $contentOfFile2 = uniqid(), $adapter->file_get_contents[3] = ($file3Part1 = uniqid()) . '"$Rev: ' . rand(1, PHP_INT_MAX) . ' $"' . ($file3Part2 = uniqid()), $adapter->file_put_contents = function () {
     })->then->object($this->testedInstance->tagVersion())->isTestedInstance->adapter($adapter)->call('file_get_contents')->withArguments($file1)->once()->call('file_put_contents')->withArguments($file1, $file1Part1 . '\'' . $version . '\'' . $file1Part2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file2)->once()->call('file_put_contents')->withArguments($file2, $contentOfFile2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file3)->once()->call('file_put_contents')->withArguments($file3, $file3Part1 . '"' . $version . '"' . $file3Part2, \LOCK_EX)->once()->if($adapter->resetCalls()->file_get_contents[2] = false)->then->exception(function () use($tagger) {
         $tagger->tagVersion(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to tag, path \'' . $file2 . '\' is unreadable')->if($adapter->resetCalls(), $adapter->file_get_contents[2] = $contentOfFile2, $adapter->file_put_contents[2] = false)->then->exception(function () use($tagger) {
         $tagger->tagVersion(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to tag, path \'' . $file2 . '\' is unwritable')->if($adapter->resetCalls(), $this->testedInstance->setDestinationDirectory($destinationDirectory = uniqid()))->when(function () use($adapter) {
         unset($adapter->file_put_contents[2]);
     })->then->object($this->testedInstance->tagVersion())->isTestedInstance->adapter($adapter)->call('is_dir')->withArguments($destinationDirectory)->exactly(3)->call('mkdir')->never()->call('file_get_contents')->withArguments($file1)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename1, $file1Part1 . '\'' . $version . '\'' . $file1Part2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file2)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename2, $contentOfFile2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file3)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename3, $file3Part1 . '"' . $version . '"' . $file3Part2, \LOCK_EX)->once()->if($adapter->resetCalls()->is_dir = false)->then->object($this->testedInstance->tagVersion())->isTestedInstance->adapter($adapter)->call('is_dir')->withArguments($destinationDirectory)->exactly(3)->call('mkdir')->withArguments($destinationDirectory, 0777, true)->exactly(3)->call('file_get_contents')->withArguments($file1)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename1, $file1Part1 . '\'' . $version . '\'' . $file1Part2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file2)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename2, $contentOfFile2, \LOCK_EX)->once()->call('file_get_contents')->withArguments($file3)->once()->call('file_put_contents')->withArguments($destinationDirectory . \DIRECTORY_SEPARATOR . $basename3, $file3Part1 . '"' . $version . '"' . $file3Part2, \LOCK_EX)->once();
 }
Ejemplo n.º 6
0
 public function testWrite()
 {
     $this->if($adapter = new atoum\test\adapter())->and($adapter->file_get_contents = '')->and($adapter->stream_context_create = $context = uniqid())->and($writer = new testedClass($adapter))->then->exception(function () use($writer) {
         $writer->write(uniqid());
     })->isInstanceOf('\\mageekguy\\atoum\\exceptions\\runtime')->hasMessage('No URL set for HTTP writer')->if($writer->setUrl($url = uniqid()))->then->object($writer->write($string = uniqid()))->isIdenticalTo($writer)->adapter($adapter)->call('stream_context_create')->withArguments(array('http' => array('method' => 'GET', 'header' => '', 'content' => $string)))->once()->call('file_get_contents')->withArguments($url, false, $context)->once()->if($writer->setMethod($method = uniqid()))->and($adapter->resetCalls())->then->object($writer->write($string = uniqid()))->isIdenticalTo($writer)->adapter($adapter)->call('stream_context_create')->withArguments(array('http' => array('method' => $method, 'header' => '', 'content' => $string)))->once()->call('file_get_contents')->withArguments($url, false, $context)->once()->if($writer->setParameter($param = uniqid()))->and($adapter->resetCalls())->then->object($writer->write($string = uniqid()))->isIdenticalTo($writer)->adapter($adapter)->call('stream_context_create')->withArguments(array('http' => array('method' => $method, 'header' => '', 'content' => http_build_query(array($param => $string)))))->once()->call('file_get_contents')->withArguments($url, false, $context)->once()->if($writer->addHeader($header = uniqid(), $value = uniqid()))->and($adapter->resetCalls())->then->object($writer->write($string = uniqid()))->isIdenticalTo($writer)->adapter($adapter)->call('stream_context_create')->withArguments(array('http' => array('method' => $method, 'header' => $header . ': ' . $value, 'content' => http_build_query(array($param => $string)))))->once()->call('file_get_contents')->withArguments($url, false, $context)->once()->if($writer->addHeader($otherHeader = uniqid(), $otherValue = uniqid()))->and($adapter->resetCalls())->then->object($writer->write($string = uniqid()))->isIdenticalTo($writer)->adapter($adapter)->call('stream_context_create')->withArguments(array('http' => array('method' => $method, 'header' => $header . ': ' . $value . "\r\n" . $otherHeader . ': ' . $otherValue, 'content' => http_build_query(array($param => $string)))))->once()->call('file_get_contents')->withArguments($url, false, $context)->once();
 }
Ejemplo n.º 7
0
 public function testResetCalls()
 {
     $this->if($adapter = new testedClass())->and($adapter->md5(uniqid()))->then->array($adapter->getCalls())->isNotEmpty()->object($adapter->resetCalls())->isIdenticalTo($adapter)->array($adapter->getCalls())->isEmpty();
 }
Ejemplo n.º 8
0
 public function testWriteInErrorDirectory()
 {
     $this->if($adapter = new atoum\test\adapter())->and($adapter->file_put_contents = function () {
     })->and($builder = new testedClass(uniqid(), $adapter))->then->variable($builder->getErrorsDirectory())->isNull()->object($builder->writeErrorInErrorsDirectory(uniqid()))->isIdenticalTo($builder)->adapter($adapter)->call('file_put_contents')->never()->if($builder->setErrorsDirectory($errorDirectory = uniqid()))->then->string($builder->getErrorsDirectory())->isEqualTo($errorDirectory)->exception(function () use($builder) {
         $builder->writeErrorInErrorsDirectory(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Revision is undefined')->adapter($adapter)->call('file_put_contents')->never()->if->mockGenerator->shunt('__construct')->and($builder->setVcs($vcs = new \mock\mageekguy\atoum\scripts\builder\vcs()))->and($vcs->setRevision($revision = rand(1, PHP_INT_MAX)))->then->string($builder->getErrorsDirectory())->isEqualTo($errorDirectory)->object($builder->writeErrorInErrorsDirectory($message = uniqid()))->isIdenticalTo($builder)->adapter($adapter)->call('file_put_contents')->withArguments($errorDirectory . \DIRECTORY_SEPARATOR . $revision, $message, \LOCK_EX | \FILE_APPEND)->once()->if($adapter->resetCalls())->and($adapter->file_put_contents = false)->then->string($builder->getErrorsDirectory())->isEqualTo($errorDirectory)->exception(function () use($builder, &$message) {
         $builder->writeErrorInErrorsDirectory($message = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\runtime')->hasMessage('Unable to save error in file \'' . $errorDirectory . \DIRECTORY_SEPARATOR . $revision . '\'')->adapter($adapter)->call('file_put_contents')->withArguments($errorDirectory . \DIRECTORY_SEPARATOR . $revision, $message, \LOCK_EX | \FILE_APPEND)->once();
 }
Ejemplo n.º 9
0
 public function testResetCalls()
 {
     $this->if($adapter = new testedClass(), $adapter->md5(uniqid()), $adapter->sha1(uniqid()))->then->sizeof($adapter->getCalls())->isEqualTo(2)->sizeof($adapter->getCalls(new call('md5')))->isEqualTo(1)->sizeof($adapter->getCalls(new call('sha1')))->isEqualTo(1)->object($adapter->resetCalls())->isIdenticalTo($adapter)->sizeof($adapter->getCalls())->isZero->if($adapter->md5(uniqid()), $adapter->sha1(uniqid()))->then->sizeof($adapter->getCalls())->isEqualTo(2)->sizeof($adapter->getCalls(new call('md5')))->isEqualTo(1)->sizeof($adapter->getCalls(new call('sha1')))->isEqualTo(1)->object($adapter->resetCalls('md5'))->isIdenticalTo($adapter)->sizeof($adapter->getCalls())->isEqualTo(1)->sizeof($adapter->getCalls(new call('md5')))->isZero->sizeof($adapter->getCalls(new call('sha1')))->isEqualTo(1)->object($adapter->resetCalls('sha1'))->isIdenticalTo($adapter)->sizeof($adapter->getCalls(new call('md5')))->isZero->sizeof($adapter->getCalls(new call('sha1')))->isZero->sizeof($adapter->getCalls())->isZero;
 }
Ejemplo n.º 10
0
 public function testResetCalls()
 {
     $this->if($adapter = new testedClass())->and($adapter->md5(uniqid()))->then->sizeof($adapter->getCalls())->isGreaterThan(0)->object($adapter->resetCalls())->isIdenticalTo($adapter)->sizeof($adapter->getCalls())->isZero(0);
 }
Ejemplo n.º 11
0
 public function testNever()
 {
     $this->if($asserter = new asserters\adapter($generator = new asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->never();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Adapter is undefined')->if($asserter->setWith($adapter = new test\adapter()))->then->exception(function () use($asserter) {
         $asserter->never();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Called function is undefined')->if($call = new php\call('md5'))->and($asserter->call('md5'))->then->object($asserter->never())->isIdenticalTo($asserter)->if($adapter->md5($usedArg = uniqid()))->then->exception(function () use(&$line, $asserter) {
         $line = __LINE__;
         $asserter->never();
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('function %s is called 1 time instead of 0'), $asserter->getCall()) . PHP_EOL . '[1] ' . $call->setArguments(array($usedArg)))->if($adapter->resetCalls())->and($asserter->withArguments($arg = uniqid()))->then->object($asserter->never())->isIdenticalTo($asserter)->if($adapter->md5($arg))->then->exception(function () use(&$line, $asserter) {
         $line = __LINE__;
         $asserter->never();
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('function %s is called 1 time instead of 0'), $asserter->getCall()) . PHP_EOL . '[1] ' . $call->setArguments(array($arg)))->if($adapter->md5($arg))->then->exception(function () use(&$otherLine, $asserter) {
         $otherLine = __LINE__;
         $asserter->never();
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage(sprintf($generator->getLocale()->_('function %s is called 2 times instead of 0'), $asserter->getCall()) . PHP_EOL . '[1] ' . $call->setArguments(array($arg)) . PHP_EOL . '[2] ' . $call->setArguments(array($arg)))->if($asserter->withArguments(uniqid()))->then->object($asserter->never())->isIdenticalTo($asserter);
 }