public function generateGlobalPageObjectInDifferentPath(CliGuy\GeneratorSteps $I) { $I->executeCommand('generate:page Login -c tests/data/sandbox'); $I->amInPath('tests/data/sandbox'); $I->seeFileWithGeneratedClass('Login', 'tests/_support/Page'); $I->seeInThisFile('static $URL = '); $I->dontSeeInThisFile('public function __construct(\\DumbGuy $I)'); $I->seeFileFound('tests/_bootstrap.php'); }
public function generateGlobalPageObjectInDifferentPath(CliGuy\GeneratorSteps $I) { $I->executeCommand('generate:page Login -c tests/data/sandbox'); $I->amInPath('tests/data/sandbox'); $I->seeFileWithGeneratedClass('LoginPage', 'tests/_pages'); $I->seeInThisFile('static $URL = '); $I->dontSeeInThisFile('public static function of(DummyGuy $I)'); $I->seeFileFound('tests/_bootstrap.php'); $I->seeInThisFile("\\Codeception\\Util\\Autoload::registerSuffix('Page', __DIR__.DIRECTORY_SEPARATOR.'_pages'"); }
<?php $I = new CliGuy\GeneratorSteps($scenario); $I->wantTo('generate new group'); $I->amInPath('tests/data/sandbox'); $I->executeCommand('generate:group core'); $I->seeFileWithGeneratedClass('CoreGroup', 'tests/_groups'); $I->seeInThisFile("static \$group = 'core'"); $I->dontSeeInThisFile('public function _before(\\Codeception\\Event\\Test \\$e)'); $I->seeFileFound('tests/_bootstrap.php'); $I->seeInThisFile("\\Codeception\\Util\\Autoload::registerSuffix('Group', __DIR__.DIRECTORY_SEPARATOR.'_groups'");