本文整理汇总了PHP中CliGuy::seeInThisFile方法的典型用法代码示例。如果您正苦于以下问题:PHP CliGuy::seeInThisFile方法的具体用法?PHP CliGuy::seeInThisFile怎么用?PHP CliGuy::seeInThisFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CliGuy
的用法示例。
在下文中一共展示了CliGuy::seeInThisFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runIncludedWithCoverage
/**
* @before moveToIncluded
* @param CliGuy $I
*/
public function runIncludedWithCoverage(\CliGuy $I)
{
$I->executeCommand('run --coverage-xml');
$I->amInPath('_log');
$I->seeFileFound('coverage.xml');
$I->seeInThisFile('<class name="BillEvans" namespace="Jazz\\Pianist">');
$I->seeInThisFile('<class name="Musician" namespace="Jazz">');
$I->seeInThisFile('<class name="Hobbit" namespace="Shire">');
}
示例2: runXmlReport
/**
* @group reports
* @param CliGuy $I
*/
public function runXmlReport(\CliGuy $I)
{
$I->wantTo('check xml reports');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run dummy --xml');
$I->seeFileFound('report.xml', 'tests/_log');
$I->seeInThisFile('<?xml');
$I->seeInThisFile('<testsuite name="dummy"');
$I->seeInThisFile('<testcase file="FileExistsCept.php"');
}
示例3: checkAfterBeforeClassInTests
public function checkAfterBeforeClassInTests(CliGuy $I)
{
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run order BeforeAfterClassTest.php');
$I->seeFileFound('order.txt', 'tests/_output');
$I->seeInThisFile('BIB({[1][2])}');
}
示例4: checkTwoFiles
public function checkTwoFiles(CliGuy $I)
{
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run order --no-exit');
$I->seeFileFound('order.txt', 'tests/_log');
$I->seeInThisFile("IBSBSBS([BST][BSTF][BST])");
}
示例5: bootstrapCompatibilityWithNamespace
public function bootstrapCompatibilityWithNamespace(\CliGuy $I)
{
$I->executeCommand('bootstrap --namespace Generated --compat');
$I->seeInShellOutput('Building Actor classes for suites');
$I->seeFileFound('codeception.yml');
$I->seeInThisFile('namespace: Generated');
$I->dontSeeInThisFile('namespace Generated\\');
$this->checkCompatFilesCreated($I);
$I->seeFileFound('WebHelper.php');
$I->seeInThisFile('namespace Generated\\Codeception\\Module;');
$I->seeFileFound('WebGuy.php');
$I->seeInThisFile('namespace Generated;');
}
示例6: bootstrapWithNamespace
public function bootstrapWithNamespace(\CliGuy $I)
{
$I->executeCommand('bootstrap --namespace Generated');
$I->seeInShellOutput('Building Actor classes for suites');
$I->seeFileFound('codeception.yml');
$I->seeInThisFile('namespace: Generated');
$I->dontSeeInThisFile('namespace Generated\\');
$this->checkFilesCreated($I);
$I->seeFileFound('Acceptance.php', 'tests/_support/Helper');
$I->seeInThisFile('namespace Generated\\Helper;');
$I->seeFileFound('AcceptanceTester.php', 'tests/_support');
$I->seeInThisFile('namespace Generated;');
}
示例7: bootstrapWithNamespace
public function bootstrapWithNamespace(\CliGuy $I)
{
$I->amInPath('tests/data/sandbox/tests/_data/');
$I->executeCommand('bootstrap --namespace Generated');
$I->seeInShellOutput('Building Guy classes for suites');
$I->seeFileFound('codeception.yml');
$I->seeInThisFile('namespace: Generated');
$I->dontSeeInThisFile('namespace Generated\\');
$this->checkFilesCreated($I);
$I->seeFileFound('WebHelper.php');
$I->seeInThisFile('namespace Generated\\Codeception\\Module;');
$I->seeFileFound('WebGuy.php');
$I->seeInThisFile('namespace Generated;');
}
示例8: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantTo('generate gherkin steps');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('generate:feature scenario Login');
$I->seeInShellOutput('Feature was created');
$I->seeFileFound('Login.feature', 'tests/scenario');
$I->seeInThisFile('Feature: Login');
$I->deleteThisFile();
$I->executeCommand('generate:feature scenario dummy/Login');
$I->seeFileFound('Login.feature', 'tests/scenario/dummy');
$I->seeInThisFile('Feature: Login');
示例9: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantTo('change configs and check that Guy is rebuilt');
$I->amInPath('tests/data/sandbox');
$I->writeToFile('tests/unit.suite.yml', <<<EOF
class_name: CodeGuy
modules:
enabled: [Cli, CodeHelper]
EOF
);
$I->executeCommand('run unit PassingTest.php --debug');
$I->seeInShellOutput('Cli');
$I->seeFileFound('tests/_support/_generated/CodeGuyActions.php');
$I->seeInThisFile('public function seeInShellOutput');
$I->seeInThisFile('public function runShellCommand');
示例10: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantTo('generate xml reports for unit tests');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run unit --xml --no-exit');
$I->seeFileFound('report.xml','tests/_log');
$I->seeInThisFile('<?xml');
$I->seeInThisFile('<testsuite name="unit" tests="5" assertions="5" failures="2" errors="0"');
$I->seeInThisFile('<testcase name="testMe" class="PassingTest"');
$I->seeInThisFile('<testcase name="testIsTriangle with data set #0" assertions="1"');
$I->seeInThisFile('<testcase name="testOne" class="DependsTest"');
$I->seeInThisFile('<failure type="PHPUnit_Framework_ExpectationFailedException">test one');
示例11: CliGuy
<?php
$I = new CliGuy($scenario);
$I->am('developer who likes testing');
$I->wantTo('generate sample Suite');
$I->lookForwardTo('have a better tests categorization');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('generate:suite house HouseGuy');
$I->seeFileFound('house.suite.yml', 'tests');
$I->expect('guy class is generated');
$I->seeInThisFile('class_name: HouseGuy');
$I->seeFileFound('HouseHelper.php', 'tests/_helpers');
$I->seeFileFound('_bootstrap.php', 'tests/house');
示例12: CliGuy
<?php
$testsPath = __DIR__ . '/../';
$I = new CliGuy($scenario);
$I->wantTo('generate xml reports for unit tests');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run unit --xml --no-exit');
$I->seeFileFound('report.xml', 'tests/_output');
$I->seeInThisFile('<?xml');
$I->seeInThisFile('<testsuite name="unit"');
$I->seeInThisFile('<testcase name="testMe" class="PassingTest"');
$I->seeInThisFile('<testcase name="testIsTriangle with data set #0" class="DataProvidersTest" ' . 'file="' . realpath($testsPath . '/data/sandbox/tests/unit/DataProvidersTest.php') . '" ');
$I->seeInThisFile('<testcase name="testOne" class="DependsTest"');
$I->seeInThisFile('<failure type="PHPUnit_Framework_ExpectationFailedException">FailingTest::testMe');
示例13: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantToTest('build command');
$I->runShellCommmand('php codecept build');
$I->seeInShellOutput('generated sucessfully');
$I->seeFileFound('TestGuy.php', 'tests/functional');
$I->seeFileFound('CodeGuy.php', 'tests/unit');
$I->seeFileFound('CliGuy.php', 'tests/acceptance');
$I->seeInThisFile('seeFileFound(');
示例14: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantTo('check tap reports');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run --tap');
$I->seeFileFound('report.tap.log', 'tests/_log');
$I->seeInThisFile('ok 1 - check config exists');
示例15: CliGuy
<?php
$I = new CliGuy($scenario);
$I->wantTo('generate sample Test');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('generate:test dummy Dummy');
$I->seeFileFound('DummyTest.php');
$I->seeInThisFile('class DummyTest extends \\Codeception\\TestCase\\Test');
$I->seeInThisFile('protected $dumbGuy');
$I->seeInThisFile("function _before(");