Skip to content

Commit

Permalink
Merge commit b3d9511b716c7b8631b59796b83c60767596a6ba into new-master
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed May 15, 2024
1 parent c053d0d commit bc1bcdf
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/Declaration/BootloaderDeclaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Spiral\Boot\BootloadManager\Methods;
use Spiral\Boot\KernelInterface;
use Spiral\Bootloader\DomainBootloader;
use Spiral\Interceptors\HandlerInterface;
use Spiral\Core\CoreInterface;
use Spiral\Scaffolder\Config\ScaffolderConfig;

class BootloaderDeclaration extends AbstractDeclaration implements HasInstructions
Expand Down Expand Up @@ -45,9 +45,9 @@ public function declare(): void

if ($this->isDomain) {
$this->class->addConstant('INTERCEPTORS', [])->setProtected();
$this->namespace->addUse(HandlerInterface::class);
$this->namespace->addUse(CoreInterface::class);
$this->class->getConstant('SINGLETONS')->setValue([
new Literal('HandlerInterface::class => [self::class, \'domainCore\']'),
new Literal('CoreInterface::class => [self::class, \'domainCore\']'),
]);
}

Expand Down
5 changes: 2 additions & 3 deletions tests/Command/BootloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use ReflectionClass;
use ReflectionException;
use Spiral\Core\CoreInterface;
use Spiral\Interceptors\HandlerInterface;
use Throwable;

final class BootloaderTest extends AbstractCommandTestCase
Expand Down Expand Up @@ -98,7 +97,7 @@ public function testScaffoldForDomainBootloader(): void
$this->assertTrue($reflection->hasConstant('SINGLETONS'));

$this->assertEquals([
HandlerInterface::class => ['Spiral\Tests\Scaffolder\App\Bootloader\SampleDomainBootloader', 'domainCore'],
CoreInterface::class => ['Spiral\Tests\Scaffolder\App\Bootloader\SampleDomainBootloader', 'domainCore'],
], $reflection->getConstant('SINGLETONS'));
}

Expand All @@ -113,7 +112,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'SampleBootloader' has been successfully written into 'Bootloader/SampleBootloader.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'ArgumentCommand' has been successfully written into 'Command/ArgumentCommand.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'InstructionConfig' has been successfully written into 'Config/InstructionConfig.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'SampleController' has been successfully written into 'Custom/Controller/SampleController.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/FilterCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'SampleFilter' has been successfully written into 'Filter/SampleFilter.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/JobHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'SampleJob' has been successfully written into 'Job/SampleJob.php'.
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/MiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function testShowInstructionAfterInstallation(): void

$output = $result->getOutput()->fetch();

$this->assertStringEqualsStringIgnoringLineEndings(
$this->assertSame(
<<<OUTPUT
Declaration of 'SampleMiddleware' has been successfully written into 'Middleware/SampleMiddleware.php'.
Expand Down

0 comments on commit bc1bcdf

Please sign in to comment.