atoum / atoum-documentation

Documentation of atoum, a php unit test framework
http://docs.atoum.org
Other
10 stars 41 forks source link

phpFunction asserter : missing in documentation #269

Closed CedCannes closed 6 years ago

CedCannes commented 7 years ago

function asserter which is the alias of phpFunction asserter is missing in the documentation. ->wasCalled() ->wasCalledWithArguments() ->wasCalledWithIdenticalArguments() ->wasCalledWithAnyArguments() ->wasCalledWithoutAnyArgument()

I found only this example in the documentation http://docs.atoum.org/fr/latest/mocking_systems.html#le-bouchonnage-mock-des-fonctions-natives-de-php

Another example that could be useful for : https://github.com/atoum/atoum-documentation/issues/268

public function testMethodWithAnErrorLog()
 {
        $this->function->error_log = true;

        $this
            ->if($this->newTestedInstance())
            ->and($this->testedInstance->methodWithAnErrorLog($notExcepted = uniqid()))
            ->then
            ->function('error_log')
                ->wasCalledWithArguments('Value '. $notExcepted.' is not excepted here')
                ->once()
        ;
}