File tree Expand file tree Collapse file tree 5 files changed +52
-1
lines changed
Expand file tree Collapse file tree 5 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Layouts extends BaseConfig
1111 *
1212 * @var string
1313 */
14- public $ default = '' ;
14+ public $ default = 'Tatter\Layouts\Views\Layouts\Default ' ;
1515
1616 /**
1717 * Provides a fallback to the default layout
File renamed without changes.
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Tests \Support \TestCase ;
4+
5+ /**
6+ * @internal
7+ */
8+ final class ConfigTest extends TestCase
9+ {
10+ public function testUsesDefaultAsFallback ()
11+ {
12+ $ result = config ('Layouts ' )->banana ;
13+
14+ $ this ->assertSame ('Tatter\Layouts\Views\Layouts\Default ' , $ result );
15+ }
16+
17+ public function testSupportsRegistrars ()
18+ {
19+ $ result = config ('Layouts ' )->foo ;
20+
21+ $ this ->assertSame ('bar ' , $ result );
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests \Support \Config ;
4+
5+ class Registrar
6+ {
7+ /**
8+ * Adds a layout to the config to verify it
9+ * supports using Registrars.
10+ *
11+ * @return array<string,string>
12+ */
13+ public static function Layouts (): array
14+ {
15+ return [
16+ 'foo ' => 'bar ' ,
17+ ];
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Tests \Support ;
4+
5+ use CodeIgniter \Test \CIUnitTestCase ;
6+
7+ abstract class TestCase extends CIUnitTestCase
8+ {
9+ }
You can’t perform that action at this time.
0 commit comments