1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

test: add replace namespace test

This commit is contained in:
David Wheatley
2021-12-12 01:33:12 +00:00
parent 3a55bd502b
commit 0fa26eae03

View File

@@ -36,4 +36,17 @@ class ViewTest extends TestCase
$this->assertEquals('<html><body>Hello World!</body></html>', trim($this->app()->getContainer()->make(Factory::class)->make('integration.test::test')->render()));
}
/**
* @test
*/
public function can_replace_view_namespace_by_extender()
{
$this->extend(
(new Extend\View)
->replace('flarum', dirname(__FILE__, 3).'/fixtures/views')
);
$this->assertEquals('<html><body>Hello World!</body></html>', trim($this->app()->getContainer()->make(Factory::class)->make('flarum::test')->render()));
}
}