コード例 #1
0
 /**
  * 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']);
 }
コード例 #2
0
 /**
  * Tear down each test.
  *
  * @return void
  */
 public function tearDown()
 {
     \Chadicus\FunctionRegistry::reset(__NAMESPACE__, ['date']);
 }
コード例 #3
0
 /**
  * set up each test.
  *
  * @return void
  */
 public function setUp()
 {
     \Chadicus\FunctionRegistry::reset(__NAMESPACE__, ['curl']);
 }