Skip to content

Commit a4b26f3

Browse files
authored
Merge pull request #33 from hydephp/test-code-cleanup
Test code cleanup
2 parents 18eee60 + c164ed9 commit a4b26f3

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
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+
}

tests/Unit/ServeCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php /** @noinspection PhpIllegalPsrClassPathInspection */
1+
<?php
22

33
use App\Commands\ServeCommand;
44
use Hyde\Foundation\HydeKernel;

tests/Unit/VendorPublishCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php /** @noinspection PhpIllegalPsrClassPathInspection */
1+
<?php
22

33
use App\Commands\VendorPublishCommand;
44
use Illuminate\Filesystem\Filesystem;

0 commit comments

Comments
 (0)