|
|
|
@ -65,7 +65,7 @@ class ViewsTest extends TestCase
|
|
|
|
|
public function setUp(): void
|
|
|
|
|
{
|
|
|
|
|
$this->views = new Views();
|
|
|
|
|
$this->views->addComponentPath('views');
|
|
|
|
|
$this->views->addComponentPath(dirname(__DIR__) . DS . 'views');
|
|
|
|
|
$this->mockController = $this->getMockBuilder(Controller::class)->getMock();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -179,8 +179,8 @@ class ViewsTest extends TestCase
|
|
|
|
|
public function testDifferentComponentPathPriority()
|
|
|
|
|
{
|
|
|
|
|
// Add the directories for this test
|
|
|
|
|
$this->views->addComponentPath('views'.DS.'TestDifferentComponentPathPriority'.DS.'Lowest', Priority::LOWEST);
|
|
|
|
|
$this->views->addComponentPath('views'.DS.'TestDifferentComponentPathPriority'.DS.'Highest', Priority::HIGHEST);
|
|
|
|
|
$this->views->addComponentPath(dirname(__DIR__) . DS . 'views'.DS.'TestDifferentComponentPathPriority'.DS.'Lowest', Priority::LOWEST);
|
|
|
|
|
$this->views->addComponentPath(dirname(__DIR__) . DS . 'views'.DS.'TestDifferentComponentPathPriority'.DS.'Highest', Priority::HIGHEST);
|
|
|
|
|
|
|
|
|
|
// Load the view and assert it is the correct type
|
|
|
|
|
$view = $this->views->get('TestDifferentComponentPathPriority', $this->mockController);
|
|
|
|
|