/** * Verify basic functionality of reset(). * * @test * @covers ::reset * @uses \Chadicus\FunctionRegistry::get * * @return void */ public function reset() { foreach (\get_extension_funcs('date') as $name) { $this->assertFalse(function_exists(__NAMESPACE__ . "\\{$name}")); } FunctionRegistry::reset(__NAMESPACE__, ['date']); foreach (\get_extension_funcs('date') as $name) { $this->assertTrue(function_exists(__NAMESPACE__ . "\\{$name}")); } // call reset again just to ensure no exceptions thrown FunctionRegistry::reset(__NAMESPACE__, ['date']); }
/** * Tear down each test. * * @return void */ public function tearDown() { \Chadicus\FunctionRegistry::reset(__NAMESPACE__, ['date']); }
/** * set up each test. * * @return void */ public function setUp() { \Chadicus\FunctionRegistry::reset(__NAMESPACE__, ['curl']); }