public function test_scope_limitation_class() { MonkeyPatch::patchFunction('function_exists', false, 'Patching_on_function'); $output = $this->request('GET', 'patching_on_function/scope_limitation_class'); $this->assertEquals("I don't have microtime(). I don't have microtime(). I have microtime().", $output); }
/** * @dataProvider provide_hours */ public function test_greet($hour, $msg) { MonkeyPatch::patchFunction('date', $hour, 'Greeter'); $actual = $this->obj->greet(); $this->assertEquals($msg, $actual); }