File tree Expand file tree Collapse file tree 5 files changed +10
-3
lines changed
_root/src/TestComponents/DemoComponent Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ public function testResourceExtension()
9090
9191 $ response = $ dispatch ->handleRequest (Request::create ('/ ' . $ childComponent ->getParentFile ()));
9292 $ this ->assertStringStartsWith ("Parent Only " , $ response ->getContent ());
93+
94+ $ response = $ dispatch ->handleRequest (Request::create ('/ ' . $ demoComponent ->getOverrideFile ()));
95+ $ this ->assertStringStartsWith ("Parent Override " , $ response ->getContent ());
96+
97+ $ response = $ dispatch ->handleRequest (Request::create ('/ ' . $ childComponent ->getOverrideFile ()));
98+ $ this ->assertStringStartsWith ("Parent Override " , $ response ->getContent ());
9399 }
94100
95101 public function testFixedResourceExtensionException ()
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ Child Override
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ public function getParentFile($allowBubbling = true)
1616 return ResourceManager::component ($ this )->getResourceUri ('parent.txt ' , $ allowBubbling );
1717 }
1818
19- public function getChildFile ($ allowBubbling = true )
19+ public function getOverrideFile ($ allowBubbling = true )
2020 {
21- return ResourceManager::component ( $ this )->getResourceUri ('child .txt ' , $ allowBubbling );
21+ return ResourceManager::componentClass ( self ::class )->getResourceUri ('override .txt ' , $ allowBubbling );
2222 }
2323}
Original file line number Diff line number Diff line change 1+ Parent Override
You can’t perform that action at this time.
0 commit comments