Beispiel #1
0
 public function test__call()
 {
     $this->if($call = new call\adapter($mockAsserter = new \mock\mageekguy\atoum\asserters\mock(new asserter\generator()), new test\adapter(), uniqid()))->and($mockAsserter->getMockController()->call = $mockAsserter)->then->object($call->call($arg = uniqid()))->isIdenticalTo($mockAsserter)->mock($mockAsserter)->call('call')->withArguments($arg)->once()->if($unknownFunction = uniqid())->then->exception(function () use($call, $unknownFunction) {
         $call->{$unknownFunction}();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic\\invalidArgument')->hasMessage('Method ' . get_class($mockAsserter) . '::' . $unknownFunction . '() does not exist');
 }