<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage xml report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote_server --coverage --xml');
$I->seeFileFound('remote_server.remote.coverage.xml', 'tests/_log');
$I->seeInThisFile('coverage generated');
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage text report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage-text');
$I->seeFileFound('coverage.txt', 'tests/_output');
$I->seeCoverageStatsNotEmpty();
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage xml report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage-html');
$I->seeFileFound('index.html', 'tests/_log/coverage');
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate codecoverage xml report with environment');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage-xml --env default');
$I->seeInShellOutput('Code Coverage Report');
$I->dontSeeInShellOutput('RemoteException');
$I->seeFileFound('coverage.xml', 'tests/_output');
$I->seeCoverageStatsNotEmpty();
<?php

$I = new CoverGuy($scenario);
$I->wantTo('run local code coverage for cest and test');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run math MathTest --coverage');
$I->seeInShellOutput('Classes: 100.00%');
$I->seeInShellOutput('Methods: 100.00%');
$I->amGoingTo('run local codecoverage in cest');
$I->executeCommand('run math MathCest --coverage');
$I->seeInShellOutput('Classes: 100.00%');
$I->seeInShellOutput('Methods: 100.00%');
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage xml report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage-xml');
$I->seeInShellOutput('Code Coverage Report');
$I->seeFileFound('coverage.xml', 'tests/_output');
$I->seeCoverageStatsNotEmpty();
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage xml report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage --xml');
$I->seeInShellOutput('Code Coverage Report');
$I->seeInShellOutput('Methods: 100.00% ( 1/ 1)');
$I->seeFileFound('coverage.xml', 'tests/_log');
<?php

$I = new CoverGuy($scenario);
$I->wantTo('try generate remote codecoverage xml report');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run remote --coverage-xml');
$I->seeInShellOutput('Code Coverage Report');
$I->seeInShellOutput(<<<EOF
index
  Methods:  50.00% ( 1/ 2)   Lines:  50.00% (  2/  4)
EOF
);
$I->seeFileFound('coverage.xml', 'tests/_log');