/** * Teardown this test case */ function tearDown() { // Unregister test stream wrapper WP_Stream_Wrapper_Registry::unregister_wrapper('test'); }
/** * Test getting the stream wrappers array * * Tests WP_Stream_Wrapper_Registry::get_stream_wrappers(). */ public function test_get_stream_wrappers() { // Register the test stream wrapper and check the schema. wp_test_stream_wrapper_register(); $stream_wrappers = WP_Stream_Wrapper_Registry::get_stream_wrappers(); // Assert that the test wrapper is registered $this->assertArrayHasKey('test', $stream_wrappers, 'The test stream wrapper should be registered here.'); // Assert that the test wrapper has the proper schema $this->assertEquals('WP Test Stream Wrapper', $stream_wrappers['test']['name']); $this->assertEquals('WP_Test_Stream_Wrapper', $stream_wrappers['test']['class']); $this->assertEquals('WP Test Stream Wrapper provides a simple extension of the WP_Local_Stream_Wrapper_Base class.', $stream_wrappers['test']['description']); // Unregister test stream wrappers WP_Stream_Wrapper_Registry::unregister_wrapper('test'); }
/** * Teardown this test case */ function tearDown() { unlink($this->uri); $this->assertFileNotExists($this->uri); // Unregister test stream wrapper WP_Stream_Wrapper_Registry::unregister_wrapper('test'); }
/** * Teardown this test case */ function tearDown() { // Remove any remaining test files wp_rmdir_recursive('test://'); // Unregister test stream wrapper WP_Stream_Wrapper_Registry::unregister_wrapper('test'); }