-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1042 from spiral/feature/listeners-list
Adding Listeners to the Tokenizer Info console command
- Loading branch information
Showing
6 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tests/Framework/Console/Command/Tokenizer/InfoCommandTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Framework\Console\Command\Tokenizer; | ||
|
||
use Spiral\Console\CommandLocatorListener; | ||
use Spiral\Prototype\PrototypeLocatorListener; | ||
use Spiral\Queue\JobHandlerLocatorListener; | ||
use Spiral\Queue\SerializerLocatorListener; | ||
use Spiral\Tests\Framework\ConsoleTestCase; | ||
|
||
final class InfoCommandTest extends ConsoleTestCase | ||
{ | ||
public function testInfoCommand(): void | ||
{ | ||
$this->assertConsoleCommandOutputContainsStrings(command: 'tokenizer:info', strings: [ | ||
'Included directories:', | ||
'app', | ||
'Excluded directories:', | ||
'app/resources/', | ||
'app/config/', | ||
'tests', | ||
'migrations', | ||
'Loaders:', | ||
'Classes', | ||
'enabled', | ||
'Enums', | ||
'disabled. To enable, add "TOKENIZER_LOAD_ENUMS=true" to your .env file.', | ||
'Interfaces', | ||
'disabled. To enable, add "TOKENIZER_LOAD_INTERFACES=true" to your .env file.', | ||
'Listeners:', | ||
CommandLocatorListener::class, | ||
'Console/src/CommandLocatorListener.php', | ||
JobHandlerLocatorListener::class, | ||
'Queue/src/JobHandlerLocatorListener.php', | ||
SerializerLocatorListener::class, | ||
'Queue/src/SerializerLocatorListener.php', | ||
PrototypeLocatorListener::class, | ||
'Prototype/src/PrototypeLocatorListener.php', | ||
'Tokenizer cache: disabled', | ||
'To enable cache, add "TOKENIZER_CACHE_TARGETS=true" to your .env file.', | ||
]); | ||
} | ||
} |