1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 15:07:53 +02:00

test: add prepend test

This commit is contained in:
David Wheatley
2021-12-12 02:10:38 +00:00
parent 34a7f1f42b
commit 256ba64a40

View File

@@ -49,4 +49,17 @@ class ViewTest extends TestCase
$this->assertEquals('<html><body>Hello World!</body></html>', trim($this->app()->getContainer()->make(Factory::class)->make('flarum::test')->render()));
}
/**
* @test
*/
public function can_prepend_view_namespace_by_extender()
{
$this->extend(
(new Extend\View)
->prepend('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()));
}
}