SecondTestIsExecutedWhenTheFirstTestFailsCest.php 1023 B

12345678910111213141516171819202122232425
  1. <?php
  2. class SecondTestIsExecutedWhenTheFirstTestFailsCest
  3. {
  4. public function testIsExecuted(CliGuy $I)
  5. {
  6. $I->wantTo('see that the second test is executed');
  7. $I->amInPath('tests/data/first_test_fails');
  8. $I->executeFailCommand('run --xml --no-ansi');
  9. $I->seeInShellOutput('Tests: 2, Assertions: 1, Errors: 1');
  10. $I->seeInShellOutput('E twoTestsCest: Failing');
  11. $I->seeInShellOutput('+ twoTestsCest: Successful');
  12. }
  13. public function endTestEventIsEmitted(CliGuy $I)
  14. {
  15. $I->wantTo('see that all start and end events are emitted');
  16. $I->amInPath('tests/data/first_test_fails');
  17. $I->executeFailCommand('run --xml --no-ansi --report -o "reporters: report: CustomReporter"');
  18. $I->seeInShellOutput('STARTED: twoTestsCest: Failing');
  19. $I->seeInShellOutput('ENDED: twoTestsCest: Failing');
  20. $I->seeInShellOutput('STARTED: twoTestsCest: Successful');
  21. $I->seeInShellOutput('ENDED: twoTestsCest: Successful');
  22. }
  23. }