silverstripe-framework/tests/php/Dev/DevAdminControllerTest/TestCommand.php
Guy Sartorelli e46135be0a
NEW Refactor CLI interaction with Silverstripe app (#11353)
- Turn sake into a symfony/console app
- Avoid using HTTPRequest for CLI interaction
- Implement abstract hybrid execution path
2024-09-26 17:16:47 +12:00

33 lines
770 B
PHP

<?php
namespace SilverStripe\Dev\Tests\DevAdminControllerTest;
use SilverStripe\Dev\Command\DevCommand;
use SilverStripe\PolyExecution\PolyOutput;
use Symfony\Component\Console\Input\InputInterface;
class TestCommand extends DevCommand
{
const OK_MSG = 'DevAdminControllerTest_TestCommand TEST OK';
protected static string $commandName = 'my-test-command';
protected static string $description = 'my test command';
public function getTitle(): string
{
return 'Test command';
}
protected function execute(InputInterface $input, PolyOutput $output): int
{
$output->write(TestCommand::OK_MSG);
return 0;
}
protected function getHeading(): string
{
return 'This is a test command';
}
}