当前位置: 首页>>代码示例>>PHP>>正文


PHP CliGuy::wantTo方法代码示例

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


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

示例1: runReportMode

 /**
  * @group reports
  *
  * @param CliGuy $I
  */
 public function runReportMode(\CliGuy $I)
 {
     $I->wantTo('try the reporting mode');
     $I->executeCommand('run dummy --report');
     $I->seeInShellOutput('FileExistsCept');
     $I->seeInShellOutput('........Ok');
 }
开发者ID:Vrian7ipx,项目名称:cascadadev,代码行数:12,代码来源:RunCest.php

示例2: 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

示例3: 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

示例4: runTestForMultipleEnvironments

 public function runTestForMultipleEnvironments(CliGuy $I)
 {
     $I->wantTo('check that multiple required environments are taken into account');
     $I->amInPath('tests/data/sandbox');
     $I->executeCommand('run messages MessageCest.php:multipleEnvRequired -vv --env env1');
     $I->dontSeeInShellOutput('Multiple env given');
     $I->executeCommand('run messages MessageCest.php:multipleEnvRequired -vv --env env2');
     $I->dontSeeInShellOutput('Multiple env given');
     $I->executeCommand('run messages MessageCest.php:multipleEnvRequired -vv --env env1,env2');
     $I->seeInShellOutput('Multiple env given');
     $I->executeCommand('run messages MessageCest.php:multipleEnvRequired -vv --env env2,env1');
     $I->seeInShellOutput('Multiple env given');
 }
开发者ID:foxman209,项目名称:Codeception,代码行数:13,代码来源:RunEnvironmentCest.php

示例5: appendIfMatch

    public function appendIfMatch(CliGuy $I)
    {
        $I->wantTo('append lines with WriteToFile task, but only if pattern does not match');
        $I->taskWriteToFile('blogpost.md')->line('****')->line('hello world')->line('****')->appendUnlessMatches('/hello/', 'Should not add this')->appendUnlessMatches('/goodbye/', 'Should add this')->appendIfMatches('/hello/', ' and should also add this')->appendIfMatches('/goodbye/', ' but should not add this')->appendIfMatches('/should/', '!')->run();
        $I->seeFileFound('blogpost.md');
        $I->seeFileContentsEqual(<<<HERE
****
hello world
****
Should add this and should also add this!
HERE
);
    }
开发者ID:jjok,项目名称:Robo,代码行数:13,代码来源:WriteFileCest.php

示例6: writeFewLines

    public function writeFewLines(CliGuy $I)
    {
        $I->wantTo('write lines with WriteToFile task');
        $I->taskWriteToFile('blogpost.md')->line('****')->line('hello world')->line('****')->run();
        $I->seeFileFound('blogpost.md');
        $I->seeFileContentsEqual(<<<HERE
****
hello world
****

HERE
);
    }
开发者ID:stefanhuber,项目名称:Robo,代码行数:13,代码来源:WriteFileCest.php

示例7: checkIfExtensionsReceiveCorrectOptions

 public function checkIfExtensionsReceiveCorrectOptions(CliGuy $I)
 {
     $I->wantTo('check if extensions receive correct options');
     $I->amInPath('tests/data/sandbox');
     $I->executeCommand('run tests/dummy/AnotherCest.php:optimistic -c codeception_extended.yml');
     $I->seeInShellOutput('Low verbosity');
     $I->executeCommand('run tests/dummy/AnotherCest.php:optimistic -c codeception_extended.yml -v');
     $I->seeInShellOutput('Medium verbosity');
     $I->executeCommand('run tests/dummy/AnotherCest.php:optimistic -c codeception_extended.yml -vv');
     $I->seeInShellOutput('High verbosity');
     $I->executeCommand('run tests/dummy/AnotherCest.php:optimistic -c codeception_extended.yml -vvv');
     $I->seeInShellOutput('Extreme verbosity');
 }
开发者ID:janhenkgerritsen,项目名称:Codeception,代码行数:13,代码来源:ExtensionsCest.php

示例8: runCustomReport

 /**
  * @group reports
  *
  * @param CliGuy $I
  */
 public function runCustomReport(\CliGuy $I)
 {
     $I->wantTo('try the reporting mode');
     $I->executeCommand('run dummy --report -c codeception_custom_report.yml');
     $I->seeInShellOutput('✔ check config exists (FileExistsCept)');
     $I->dontSeeInShellOutput('Ok');
 }
开发者ID:corcre,项目名称:elabftw,代码行数:12,代码来源:RunCest.php

示例9: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('use alternative formatter delivered through extensions');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run tests/skipped/CommentsCept.php -c codeception_extended.yml');
$I->dontSeeInShellOutput("Trying to talk, just talk");
$I->dontSeeInShellOutput('As a very lazy qa');
$I->seeInShellOutput('[+] talk, just talk');
开发者ID:lenninsanchez,项目名称:donadores,代码行数:9,代码来源:AlternativeFormatterCept.php

示例10: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('archive directory and then extract it again with Archive and Extract tasks');
$I->amInPath(codecept_data_dir() . 'sandbox');
$I->seeDirFound('some/deeply/nested');
$I->seeFileFound('structu.re', 'some/deeply/nested');
$I->seeFileFound('existing_file', 'some/deeply');
// Test a bunch of archive types that we support
foreach (['zip', 'tar', 'tar.gz', 'tar.bz2', 'tgz'] as $archiveType) {
    // First, take everything from the folder 'some/deeply' and make
    // an archive for it located in 'deep'
    $I->taskPack("deeply.{$archiveType}")->add(['deep' => 'some/deeply'])->run();
    $I->seeFileFound("deeply.{$archiveType}");
    // We are next going to extract the archive we created, this time
    // putting it into a folder called "extracted-$archiveType" (different
    // for each archive type we test).  We rely on the default behavior
    // of our extractor to remove the top-level directory in the archive
    // ("deeply").
    $I->taskExtract("deeply.{$archiveType}")->to("extracted-{$archiveType}")->preserveTopDirectory(false)->run();
    $I->seeDirFound("extracted-{$archiveType}");
    $I->seeDirFound("extracted-{$archiveType}/nested");
    $I->seeFileFound('structu.re', "extracted-{$archiveType}/nested");
    // Next, we'll extract the same archive again, this time preserving
    // the top-level folder.
    $I->taskExtract("deeply.{$archiveType}")->to("preserved-{$archiveType}")->preserveTopDirectory()->run();
    $I->seeDirFound("preserved-{$archiveType}");
    $I->seeDirFound("preserved-{$archiveType}/deep/nested");
    $I->seeFileFound('structu.re', "preserved-{$archiveType}/deep/nested");
    // Make another archive, this time composed of fanciful locations
    $I->taskPack("composed.{$archiveType}")->add(['a/b/existing_file' => 'some/deeply/existing_file'])->add(['x/y/z/structu.re' => 'some/deeply/nested/structu.re'])->run();
开发者ID:surjit,项目名称:PHP-Robo-Task-Runner,代码行数:31,代码来源:PackExtractCept.php

示例11: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('overwrite a file with CopyDir task');
$I->amInPath(codecept_data_dir() . 'sandbox');
$I->seeDirFound('some');
$I->seeFileFound('existing_file', 'some');
$I->taskCopyDir(['some' => 'some_destination'])->run();
$I->seeFileFound('existing_file', 'some_destination/deeply');
$I->openFile('some_destination/deeply/existing_file');
$I->seeInThisFile('some existing file');
开发者ID:jjok,项目名称:Robo,代码行数:11,代码来源:CopyDirOverwritesFilesCept.php

示例12: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('execute incomplete test');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run skipped IncompleteMeCept.php');
$I->seeInShellOutput("I IncompleteMeCept: Make it incomplete");
$I->seeInShellOutput('OK, but incomplete, skipped, or risky tests!');
开发者ID:solutionDrive,项目名称:Codeception,代码行数:8,代码来源:RunIncompleteCept.php

示例13: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('run skipped test');
$I->amInPath('tests/data/sandbox');
$I->executeCommand('run skipped SkipMeCept.php');
$I->seeShellOutputMatches("~\\(SkipMeCept\\)\\s*?Skipped~");
$I->seeInShellOutput('OK, but incomplete, skipped, or risky tests!');
开发者ID:Eli-TW,项目名称:Codeception,代码行数:8,代码来源:RunSkippedCept.php

示例14: 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

示例15: CliGuy

<?php

$I = new CliGuy($scenario);
$I->wantTo('copy dir recursively with CopyDir task');
$I->amInPath(codecept_data_dir() . 'sandbox');
$I->seeDirFound('some/deeply/nested');
$I->seeFileFound('structu.re', 'some/deeply/nested');
$I->taskCopyDir(['some/deeply' => 'some_destination/deeply'])->run();
$I->seeDirFound('some_destination/deeply/nested');
$I->seeFileFound('structu.re', 'some_destination/deeply/nested');
开发者ID:stefanhuber,项目名称:Robo,代码行数:10,代码来源:CopyDirRecursiveCept.php


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