SimpleMock::atTestEnd PHP 메소드

atTestEnd() 공개 메소드

Totals up the call counts and triggers a test assertion if a test is present for expected call counts.
public atTestEnd ( string $test_method, SimpleTestCase &$test )
$test_method string Current method name.
$test SimpleTestCase Test to send message to.
    public function atTestEnd($test_method, &$test)
    {
        foreach ($this->expected_counts as $method => $expectation) {
            $test->assert($expectation, $this->getCallCount($method));
        }
        foreach ($this->max_counts as $method => $expectation) {
            if ($expectation->test($this->getCallCount($method))) {
                $test->assert($expectation, $this->getCallCount($method));
            }
        }
    }