foo\ExampleTest::testExample4 PHP Метод

testExample4() публичный Метод

Tests the example from the documentation.
public testExample4 ( )
    public function testExample4()
    {
        $function = function () {
            throw new \Exception();
        };
        $mock = new Mock(__NAMESPACE__, "time", $function);
        $mock->enable();
        try {
            time();
        } finally {
            $mock->disable();
        }
    }