mageekguy\atoum\asserters\adapter::withAnyArguments PHP Method

withAnyArguments() public method

public withAnyArguments ( )
    public function withAnyArguments()
    {
        return $this->unsetArguments();
    }

Usage Example

Beispiel #1
0
 public function testWithAnyArguments()
 {
     $this->mockGenerator->orphanize('asserterFail')->if($asserter = new sut(new \mock\mageekguy\atoum\asserter\generator()))->then->exception(function () use($asserter) {
         $asserter->withArguments(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserters\\adapter\\exceptions\\logic')->hasMessage('Adapter is undefined')->if($asserter->setWith($adapter = new test\adapter()))->then->exception(function () use($asserter) {
         $asserter->withArguments(uniqid());
     })->isInstanceOf('mageekguy\\atoum\\asserters\\adapter\\exceptions\\logic')->hasMessage('Call is undefined')->if($asserter->call($function = uniqid()))->then->object($asserter->getCall())->isEqualTo(new test\adapter\call($function))->object($asserter->withAnyArguments())->isIdenticalTo($asserter)->object($asserter->getCall())->isEqualTo(new test\adapter\call($function))->if($asserter->disableEvaluationChecking()->withArguments($arg = uniqid()))->then->object($asserter->getCall())->isEqualTo(new test\adapter\call($function, array($arg)))->object($asserter->withAnyArguments())->isIdenticalTo($asserter)->object($asserter->getCall())->isEqualTo(new test\adapter\call($function));
 }