Ejemplo n.º 1
0
 public function testAll()
 {
     $this->mockGenerator->shuntParentClassCalls()->mockGenerator->orphanize('__construct')->given($probeMock = new \mock\Blackfire\Probe(), $clientMock = new \mock\Blackfire\Client())->mockGenerator->unshuntParentClassCalls()->given($this->calling($clientMock)->createProbe = $probeMock, $this->calling($clientMock)->endProbe = $this->getErrorProfile(), $config = new \Blackfire\Profile\Configuration());
     $this->if($testedClass = new testedClass(), $testedClass->setConfiguration($config), $testedClass->setClient($clientMock))->then->exception(function () use($testedClass) {
         $testedClass->profile(function () {
         });
     })->hasMessage($this->getExpectedErrorMessage())->isInstanceOf('\\mageekguy\\atoum\\asserter\\exception')->mock($clientMock)->call('createProbe')->once()->mock($clientMock)->call('endProbe')->once();
     $this->given($test = new \mock\mageekguy\atoum\test(), $this->calling($clientMock)->endProbe = $this->getOkProfile())->if($testedClass = new testedClass(), $testedClass->setWithTest($test), $testedClass->setClient($clientMock), $testedClass->profile(function () {
     }));
 }