ConfigNoActorCest.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * @depends ConfigBundledSuitesCest:runBundledSuite
  4. */
  5. class ConfigNoActorCest
  6. {
  7. /**
  8. * @depends ConfigBundledSuitesCest:runBundledSuite
  9. * @param CliGuy $I
  10. */
  11. public function runSuitesWithoutActor(CliGuy $I)
  12. {
  13. $I->amInPath('tests/data/no_actor_suites');
  14. $I->executeCommand('run -vvv');
  15. $I->seeInShellOutput('OK (1 test');
  16. }
  17. public function suitesWithoutActorDontHaveActorFiles(CliGuy $I)
  18. {
  19. $I->amInPath('tests/data/no_actor_suites');
  20. $I->executeCommand('build');
  21. $I->dontSeeFileFound('*.php', 'tests/_support');
  22. }
  23. public function suitesWithoutActorGenerators(CliGuy $I)
  24. {
  25. $I->amInPath('tests/data/no_actor_suites');
  26. $I->executeFailCommand('generate:cept unit Some');
  27. $I->seeResultCodeIsNot(0);
  28. $I->executeFailCommand('generate:cest unit Some');
  29. $I->seeResultCodeIsNot(0);
  30. $I->executeFailCommand('generate:test unit Some');
  31. $I->seeResultCodeIs(0);
  32. $I->seeFileFound('SomeTest.php', 'tests');
  33. $I->seeInThisFile('class SomeTest extends \Codeception\Test\Unit');
  34. $I->dontSeeInThisFile('$tester');
  35. $I->deleteFile('tests/SomeTest.php');
  36. }
  37. }