MyCustomCommandTest.php 658 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Project\Command;
  3. class MyCustomCommandTest extends \PHPUnit\Framework\TestCase
  4. {
  5. public static function setUpBeforeClass()
  6. {
  7. require_once \Codeception\Configuration::dataDir() . 'register_command/examples/MyCustomCommand.php';
  8. }
  9. public function testHasCodeceptionCustomCommandInterface()
  10. {
  11. $command = new MyCustomCommand('commandName');
  12. $this->assertInstanceOf('Codeception\CustomCommandInterface', $command);
  13. }
  14. public function testHasCommandName()
  15. {
  16. $commandName = MyCustomCommand::getCommandName();
  17. $this->assertEquals('myProject:myCommand', $commandName);
  18. }
  19. }