public function testWRequestedTemplate() { $layoutRegister = new \Dxw\Iguana\Theme\LayoutRegister($this->getHelpers()); $file = \org\bovigo\vfs\vfsStream::setup()->url() . '/file.php'; file_put_contents($file, '<?php global $called; $called++;'); \Dxw\Iguana\Theme\Layout::$wordpress_template = $file; global $called; $called = 0; $layoutRegister->wRequestedTemplate(); $this->assertEquals(1, $called); }
public function tearDown() { \WP_Mock::tearDown(); \Dxw\Iguana\Theme\Layout::$wordpress_template = null; \Dxw\Iguana\Theme\Layout::$base = null; }