mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Rename view extender
As discussed in my initial review, it seems unlikely that we need the ability to remove (or otherwise modify) namespaces again. Therefore, it seems more consistent with other extenders to go for a "View" extender with a "namespace" method. Sorry for the back and forth. ;) Refs #1891, #2134.
This commit is contained in:
@@ -13,7 +13,7 @@ use Flarum\Extend;
|
||||
use Flarum\Tests\integration\TestCase;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
|
||||
class ViewNamespaceTest extends TestCase
|
||||
class ViewTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
@@ -30,8 +30,8 @@ class ViewNamespaceTest extends TestCase
|
||||
public function custom_view_namespace_can_be_added_by_extender()
|
||||
{
|
||||
$this->extend(
|
||||
(new Extend\ViewNamespace)
|
||||
->add('integration.test', dirname(__FILE__, 3).'/fixtures/views')
|
||||
(new Extend\View)
|
||||
->namespace('integration.test', dirname(__FILE__, 3).'/fixtures/views')
|
||||
);
|
||||
|
||||
$this->assertEquals('<html><body>Hello World!</body></html>', trim($this->app()->getContainer()->make(Factory::class)->make('integration.test::test')->render()));
|
Reference in New Issue
Block a user