reset() public static method

Resets the Media class to its default state. Mainly used for ensuring a consistent state during testing.
public static reset ( )
Exemplo n.º 1
0
 /**
  * Tests that the `Media` class' configuration can be reset to its default state.
  *
  * @return void
  */
 public function testStateReset()
 {
     $this->assertFalse(in_array('foo', Media::types()));
     Media::type('foo', 'text/x-foo');
     $this->assertTrue(in_array('foo', Media::types()));
     Media::reset();
     $this->assertFalse(in_array('foo', Media::types()));
 }
Exemplo n.º 2
0
 public function setUp()
 {
     Media::reset();
 }