File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ public function exists($view)
323
323
public function getEngineFromPath ($ path )
324
324
{
325
325
if ($ this ->hasPathEngine ($ path )) {
326
- return $ this ->pathEngines [ $ path] ;
326
+ return $ this ->getPathEngine ( $ path) ;
327
327
}
328
328
329
329
if (! $ extension = $ this ->getExtension ($ path )) {
@@ -334,7 +334,7 @@ public function getEngineFromPath($path)
334
334
335
335
$ this ->setPathEngine ($ path , $ this ->engines ->resolve ($ engine ));
336
336
337
- return $ this ->pathEngines [ $ path] ;
337
+ return $ this ->getPathEngine ( $ path) ;
338
338
}
339
339
340
340
/**
@@ -503,6 +503,11 @@ public function setPathEngine($path, $engine)
503
503
$ this ->pathEngines [$ path ] = $ engine ;
504
504
}
505
505
506
+ public function getPathEngine ($ path )
507
+ {
508
+ return $ this ->pathEngines [$ path ];
509
+ }
510
+
506
511
public function hasPathEngine ($ path )
507
512
{
508
513
return isset ($ this ->pathEngines [$ path ]);
Original file line number Diff line number Diff line change @@ -842,7 +842,7 @@ public function testMakeWithSlashAndDot()
842
842
{
843
843
$ factory = $ this ->getFactory ();
844
844
$ factory ->getFinder ()->shouldReceive ('find ' )->twice ()->with ('foo.bar ' )->andReturn ('path.php ' );
845
- $ factory ->getEngineResolver ()->shouldReceive ('resolve ' )->twice ()->with ('php ' )->andReturn (m::mock (Engine::class));
845
+ $ factory ->getEngineResolver ()->shouldReceive ('resolve ' )->once ()->with ('php ' )->andReturn (m::mock (Engine::class));
846
846
$ factory ->getDispatcher ()->shouldReceive ('hasListeners ' )->andReturn (false );
847
847
$ factory ->make ('foo/bar ' );
848
848
$ factory ->make ('foo.bar ' );
@@ -852,7 +852,7 @@ public function testNamespacedViewNamesAreNormalizedProperly()
852
852
{
853
853
$ factory = $ this ->getFactory ();
854
854
$ factory ->getFinder ()->shouldReceive ('find ' )->twice ()->with ('vendor/package::foo.bar ' )->andReturn ('path.php ' );
855
- $ factory ->getEngineResolver ()->shouldReceive ('resolve ' )->twice ()->with ('php ' )->andReturn (m::mock (Engine::class));
855
+ $ factory ->getEngineResolver ()->shouldReceive ('resolve ' )->once ()->with ('php ' )->andReturn (m::mock (Engine::class));
856
856
$ factory ->getDispatcher ()->shouldReceive ('hasListeners ' )->andReturn (false );
857
857
$ factory ->make ('vendor/package::foo/bar ' );
858
858
$ factory ->make ('vendor/package::foo.bar ' );
You can’t perform that action at this time.
0 commit comments