UnitCept.php 941 B

12345678910111213141516171819
  1. <?php
  2. $testsPath = __DIR__ . '/../';
  3. $I = new CliGuy($scenario);
  4. $I->wantTo('generate xml reports for unit tests');
  5. $I->amInPath('tests/data/sandbox');
  6. $I->executeCommand('run unit --xml --no-exit');
  7. $I->seeFileFound('report.xml', 'tests/_output');
  8. $I->seeInThisFile('<?xml');
  9. $I->seeInThisFile('<testsuite name="unit"');
  10. $I->seeInThisFile('<testcase name="testMe" class="PassingTest"');
  11. $I->seeInThisFile('<testcase name="testIsTriangle with data set #0" class="DataProvidersTest" '.
  12. 'file="' . realpath($testsPath . '/data/sandbox/tests/unit/DataProvidersTest.php') .'" ');
  13. $I->seeInThisFile('<testcase name="testOne" class="DependsTest"');
  14. if (!class_exists('PHPUnit_Framework_ExpectationFailedException')) {
  15. $I->seeInThisFile('<failure type="PHPUnit\Framework\ExpectationFailedException">FailingTest::testMe');
  16. } else {
  17. $I->seeInThisFile('<failure type="PHPUnit_Framework_ExpectationFailedException">FailingTest::testMe');
  18. }