Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test for codeception.yaml in random subdir
- Loading branch information
Showing
9 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
class CodeceptionYmlInRandomDirCest | ||
{ | ||
/** | ||
* @param CliGuy $I | ||
*/ | ||
public function runTestPath(\CliGuy $I) | ||
{ | ||
$I->amInPath('tests/data/codeception_yml_in_random_dir'); | ||
$I->executeCommand('run -c random/subdir/codeception.yml tests/unit/ExampleCest.php'); | ||
|
||
$I->seeResultCodeIs(0); | ||
$I->dontSeeInShellOutput('RuntimeException'); | ||
$I->dontSeeInShellOutput('could not be found'); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/data/codeception_yml_in_random_dir/random/subdir/codeception.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
actor: Tester | ||
paths: | ||
tests: ../../tests | ||
log: ../../tests/_output | ||
data: ../../tests/_data | ||
support: ../../tests/_support | ||
settings: | ||
bootstrap: ../../tests/_bootstrap.php |
2 changes: 2 additions & 0 deletions
2
tests/data/codeception_yml_in_random_dir/tests/_bootstrap.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// This is global bootstrap for autoloading |
2 changes: 2 additions & 0 deletions
2
tests/data/codeception_yml_in_random_dir/tests/_output/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
26 changes: 26 additions & 0 deletions
26
tests/data/codeception_yml_in_random_dir/tests/_support/UnitTester.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?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 UnitTester extends \Codeception\Actor | ||
{ | ||
use _generated\UnitTesterActions; | ||
|
||
/** | ||
* Define custom actions here | ||
*/ | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/data/codeception_yml_in_random_dir/tests/_support/_generated/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
8 changes: 8 additions & 0 deletions
8
tests/data/codeception_yml_in_random_dir/tests/unit.suite.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Codeception Test Suite Configuration | ||
# | ||
# Suite for unit (internal) tests. | ||
|
||
class_name: UnitTester | ||
modules: | ||
enabled: | ||
- Asserts |
9 changes: 9 additions & 0 deletions
9
tests/data/codeception_yml_in_random_dir/tests/unit/ExampleCest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
class ExampleCest | ||
{ | ||
public function successful(UnitTester $I) | ||
{ | ||
$I->assertTrue(true); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/data/codeception_yml_in_random_dir/tests/unit/_bootstrap.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// Here you can initialize variables that will be available to your tests |