コード例 #1
0
 public function bootstrapEmpty(\CliGuy $I)
 {
     $I->executeCommand('bootstrap --empty');
     $I->dontSeeFileFound('tests/acceptance');
     $I->dontSeeFileFound('AcceptanceTester.php', 'tests/acceptance');
     $I->seeFileFound('codeception.yml');
 }
コード例 #2
0
ファイル: FilesystemStackCest.php プロジェクト: jjok/Robo
 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');
 }
コード例 #3
0
ファイル: RunCest.php プロジェクト: Vrian7ipx/cascadadev
    public function runWithCustomOuptutPath(\CliGuy $I)
    {
        $I->executeCommand('run dummy --xml myverycustom.xml --html myownhtmlreport.html');
        $I->seeFileFound('myverycustom.xml', 'tests/_log');
        $I->seeInThisFile('<?xml');
        $I->seeInThisFile('<testsuite name="dummy"');
        $I->seeInThisFile('<testcase name="FileExists"');
        $I->seeFileFound('myownhtmlreport.html', 'tests/_log');
        $I->dontSeeFileFound('report.xml','tests/_log');
        $I->dontSeeFileFound('report.html','tests/_log');

    }
コード例 #4
0
ファイル: DeleteDirCept.php プロジェクト: stefanhuber/Robo
<?php

$I = new CliGuy($scenario);
$I->wantTo('delete dir with DeleteDirTask');
$I->amInPath(codecept_data_dir());
$I->seeFileFound('robo.txt', 'sandbox');
$I->taskDeleteDir(['sandbox/box'])->run();
$I->dontSeeFileFound('box', 'sandbox');
$I->dontSeeFileFound('robo.txt', 'sandbox');
コード例 #5
0
ファイル: FileSystemStackCest.php プロジェクト: zondor/Robo
 public function toDeleteFile(CliGuy $I)
 {
     $I->taskFileSystemStack()->stopOnFail()->remove('a.txt')->run();
     $I->dontSeeFileFound('a.txt');
 }