mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
test: add prepend test
This commit is contained in:
@@ -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()));
|
$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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user