wasNotCalled() public method

public wasNotCalled ( $failMessage = null )
コード例 #1
0
ファイル: mock.php プロジェクト: andrewolobo/mpTracker
 public function testWasNotCalled()
 {
     $this->if($asserter = new sut($generator = new asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->wasNotCalled();
     })->isInstanceOf('mageekguy\\atoum\\exceptions\\logic')->hasMessage('Mock is undefined')->if($adapter = new atoum\test\adapter())->and($adapter->class_exists = true)->and($asserter->setWith($mock = new \mock\mageekguy\atoum\tests\units\asserters\mock($adapter)))->and($mock->getMockController()->resetCalls())->then->object($asserter->wasNotCalled())->isIdenticalTo($asserter)->if($mock->getMockController()->{$method = __FUNCTION__} = function () {
     })->and($mock->{$method}())->then->exception(function () use($asserter, &$failMessage) {
         $asserter->wasNotCalled($failMessage = uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserter\\exception')->hasMessage($failMessage);
 }