Commit b67af5f6 authored by Tobias Munk's avatar Tobias Munk

added CLI tests

parent 013b9eda
<?php
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class CliTester extends \Codeception\Actor
{
use _generated\CliTesterActions;
/**
* Define custom actions here
*/
}
This diff is collapsed.
# Codeception Test Suite Configuration
# suite for acceptance tests.
# perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
class_name: CliTester
modules:
enabled:
- Filesystem
- Cli
<?php
// @group mandatory
$I = new CliTester($scenario);
$I->runShellCommand("/app/yii help gii");
$I->seeInShellOutput('DESCRIPTION');
$I->seeInShellOutput('SUB-COMMANDS');
$I->seeInShellOutput('gii/');
$I->runShellCommand("/app/yii help gii/giiant-crud");
$I->seeInShellOutput('DESCRIPTION');
$I->seeInShellOutput('yii gii/giiant-crud');
<?php
// @group mandatory
$I = new CliTester($scenario);
$I->runShellCommand('/app/yii');
$I->seeInShellOutput('This is Yii version 2.0.');
<?php
// add cli testing specific bootstrap code here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment