From 0fa26eae03d8999506edaa75ca2f5fdf7766c610 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Sun, 12 Dec 2021 01:33:12 +0000 Subject: [PATCH] test: add replace namespace test --- tests/integration/extenders/ViewTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/integration/extenders/ViewTest.php b/tests/integration/extenders/ViewTest.php index f9c101eac..5874d3ebd 100644 --- a/tests/integration/extenders/ViewTest.php +++ b/tests/integration/extenders/ViewTest.php @@ -36,4 +36,17 @@ class ViewTest extends TestCase $this->assertEquals('Hello World!', 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('Hello World!', trim($this->app()->getContainer()->make(Factory::class)->make('flarum::test')->render())); + } }