Skip to content

Commit fbb9d7b

Browse files
committed
Add test to cover all branches of application class
1 parent 18eee60 commit fbb9d7b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Unit/ApplicationTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,17 @@
2424
it('uses custom namespace', function () {
2525
expect((new Application())->getNamespace())->toBe('App');
2626
});
27+
28+
it('uses parent namespace logic if composer.json exists', function () {
29+
$application = new ApplicationWithPublicNamespace();
30+
31+
$application->namespace = 'Example';
32+
$application->setBasePath(__DIR__.'/../../');
33+
34+
expect($application->getNamespace())->toBe('Example');
35+
});
36+
37+
class ApplicationWithPublicNamespace extends Application
38+
{
39+
public $namespace;
40+
}

0 commit comments

Comments
 (0)