• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP CliGuy类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CliGuy的典型用法代码示例。如果您正苦于以下问题:PHP CliGuy类的具体用法?PHP CliGuy怎么用?PHP CliGuy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CliGuy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: configStartWithWrongPath

 public function configStartWithWrongPath(CliGuy $I)
 {
     $I->wantTo('start codeception with wrong path to a codeception.yml file');
     $I->amInPath('tests/data/register_command/');
     $I->executeFailCommand('-c no/exists/codeception.yml');
     $I->seeInShellOutput('Your configuration file `no/exists/codeception.yml` could not be found.');
 }
开发者ID:thangnvaltplus,项目名称:Codeception,代码行数:7,代码来源:GlobalCommandOptionCest.php


示例2: 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])");
 }
开发者ID:pfz,项目名称:codeception,代码行数:7,代码来源:OrderCest.php


示例3: runOneGroup

 public function runOneGroup(\CliGuy $I)
 {
     $I->amInPath('tests/data/sandbox');
     $I->executeCommand('run skipped -g notorun');
     $I->seeInShellOutput("Incomplete");
     $I->dontSeeInShellOutput("Skipped");
 }
开发者ID:pfz,项目名称:codeception,代码行数:7,代码来源:RunCest.php


示例4: useTheMirrorDirShortcut

 public function useTheMirrorDirShortcut(CliGuy $I)
 {
     $I->wantTo('mirror dir with _mirrorDir shortcut');
     $I->shortcutMirrorDir('box', 'bin');
     $I->seeDirFound('bin');
     $I->seeFileFound('robo.txt', 'bin');
 }
开发者ID:stefanhuber,项目名称:Robo,代码行数:7,代码来源:ShortcutsCest.php


示例5: 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])}');
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:7,代码来源:OrderCest.php


示例6: toExecLsCommand

 public function toExecLsCommand(CliGuy $I)
 {
     $command = strncasecmp(PHP_OS, 'WIN', 3) == 0 ? 'dir' : 'ls';
     $res = $I->taskExec($command)->run();
     verify($res->getMessage())->contains('src');
     verify($res->getMessage())->contains('codeception.yml');
 }
开发者ID:zondor,项目名称:Robo,代码行数:7,代码来源:ExecCest.php


示例7: checkEnvParamsPassed

 public function checkEnvParamsPassed(CliGuy $I)
 {
     $I->amInPath('tests/data/params');
     $I->executeCommand('run --no-exit');
     $I->seeInShellOutput('FAILURES');
     $I->seeInShellOutput("Failed asserting that an array contains 'val1'");
 }
开发者ID:janhenkgerritsen,项目名称:Codeception,代码行数:7,代码来源:ConfigParamsCest.php


示例8: buildIncluded

 /**
  * @before moveToIncluded
  * @param CliGuy $I
  */
 public function buildIncluded(\CliGuy $I)
 {
     $I->executeCommand('build');
     $I->seeInShellOutput('generated successfully');
     $I->seeInShellOutput('Jazz\\TestGuy');
     $I->seeInShellOutput('Jazz\\Pianist\\TestGuy');
     $I->seeInShellOutput('Shire\\TestGuy');
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:12,代码来源:IncludedCest.php


示例9: startMyCommandWithOptionAndConfigurationAtNewPlace

 public function startMyCommandWithOptionAndConfigurationAtNewPlace(CliGuy $I)
 {
     $myname = get_current_user();
     $I->amInPath('tests/data/register_command');
     $I->executeCommand('myProject:myCommand --config standard/codeception.yml --friendly');
     $I->seeInShellOutput("Hello {$myname},");
     $I->seeInShellOutput("how are you?");
 }
开发者ID:solutionDrive,项目名称:Codeception,代码行数:8,代码来源:RegisterCommandCest.php


示例10: checkAllSuitesExecuted

 protected function checkAllSuitesExecuted(\CliGuy $I)
 {
     $I->seeInShellOutput('[ToastPack]');
     $I->seeInShellOutput('ToastPack.unit Tests');
     $I->seeInShellOutput('[EwokPack]');
     $I->seeInShellOutput('EwokPack.unit Tests');
     $I->seeInShellOutput('[AcmePack]');
     $I->seeInShellOutput('AcmePack.unit Tests');
     $I->dontSeeInShellOutput('[Spam]');
     $I->dontSeeInShellOutput('[SpamPack]');
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:11,代码来源:WildcardIncludeCest.php


示例11: runFeature

 public function runFeature(CliGuy $I)
 {
     $I->executeCommand('dry-run scenario File.feature --no-ansi');
     $I->seeInShellOutput('Run gherkin: Check file exists');
     $I->seeInShellOutput('In order to test a feature');
     $I->seeInShellOutput('As a user');
     $I->seeInShellOutput('Given i have terminal opened');
     $I->seeInShellOutput('INCOMPLETE');
     $I->seeInShellOutput('Step definition for `I have only idea of what\'s going on here` not found');
 }
开发者ID:solutionDrive,项目名称:Codeception,代码行数:10,代码来源:DryRunCest.php


示例12: toTestCrossVolumeRename

 public function toTestCrossVolumeRename(CliGuy $I)
 {
     $fsStack = $I->taskFilesystemStack()->mkdir('log')->touch('log/error.txt');
     $fsStack->run();
     // We can't force _rename to run the cross-volume
     // code path, so we will directly call the protected
     // method crossVolumeRename to test to ensure it works.
     // We will get a reference to it via reflection, set
     // the reflected method object to public, and then
     // call it via reflection.
     $class = new ReflectionClass('\\Robo\\Task\\Filesystem\\FilesystemStack');
     $method = $class->getMethod('crossVolumeRename');
     $method->setAccessible(true);
     $actualFsStackTask = $fsStack->getCollectionBuilderCurrentTask();
     $method->invokeArgs($actualFsStackTask, ['log', 'logfiles']);
     $I->dontSeeFileFound('log/error.txt');
     $I->seeFileFound('logfiles/error.txt');
 }
开发者ID:jjok,项目名称:Robo,代码行数:18,代码来源:FilesystemStackCest.php


示例13: 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">');
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:13,代码来源:IncludedCest.php


示例14: snippetsScenarioFolder

 public function snippetsScenarioFolder(CliGuy $I)
 {
     $I->executeCommand('gherkin:snippets scenario subfolder');
     $I->seeInShellOutput('Given I have a feature in a subfolder');
     $I->seeInShellOutput('public function iHaveAFeatureInASubfolder');
     $I->dontSeeInShellOutput('@Given I have only idea of what\'s going on here');
     $I->dontSeeInShellOutput('public function iHaveOnlyIdeaOfWhatsGoingOnHere');
 }
开发者ID:solutionDrive,项目名称:Codeception,代码行数:8,代码来源:GherkinCest.php


示例15: checkCodeceptionTest

 public function checkCodeceptionTest(CliGuy $I)
 {
     $I->amInPath('tests/data/sandbox');
     $I->executeCommand('run order CodeTest.php --no-exit');
     $I->seeFileFound('order.txt', 'tests/_log');
     $I->expect('global bootstrap, initialization, beforeSuite, beforeClass, bootstrap, before, after, afterSuite, afterClass');
     $I->seeFileContentsEqual("BI({B[C])}");
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:8,代码来源:OrderCest.php


示例16: environmentsFromSubfolders

 public function environmentsFromSubfolders(CliGuy $I)
 {
     $I->amInPath('tests/data/sandbox');
     $I->executeCommand('run messages MessageCest.php:allMessages -vv --env env3');
     $I->seeInShellOutput('MESSAGE2 FROM ENV3');
 }
开发者ID:foxman209,项目名称:Codeception,代码行数:6,代码来源:RunEnvironmentCest.php


示例17: 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');
开发者ID:solutionDrive,项目名称:Codeception,代码行数:13,代码来源:GenerateFeatureCept.php


示例18: replaceMultipleInFile

 public function replaceMultipleInFile(CliGuy $I)
 {
     $I->taskReplaceInFile('box/robo.txt')->from(array('HELLO', 'ROBO'))->to(array('Hello ', 'robo.li!'))->run();
     $I->seeFileFound('box/robo.txt');
     $I->seeFileContentsEqual('Hello robo.li!');
 }
开发者ID:stefanhuber,项目名称:Robo,代码行数:6,代码来源:WriteFileCest.php


示例19: 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');
开发者ID:hitechdk,项目名称:Codeception,代码行数:16,代码来源:AutoRebuildCept.php


示例20: 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(');
开发者ID:BatVane,项目名称:Codeception,代码行数:10,代码来源:BuildCept.php



注:本文中的CliGuy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Client类代码示例发布时间:2022-05-20
下一篇:
PHP Cli类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap