forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBootstrapCest.php
More file actions
52 lines (40 loc) · 1.75 KB
/
Copy pathBootstrapCest.php
File metadata and controls
52 lines (40 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
class BootstrapCest
{
public function bootstrapProject(\CliGuy $I) {
$I->amInPath('tests/data/sandbox/tests/_data/');
$I->executeCommand('bootstrap --silent');
$I->seeFileFound('codeception.yml');
$this->checkFilesCreated($I);
$I->seeInShellOutput('Building Guy classes for suites');
}
public function bootstrapWithNamespace(\CliGuy $I)
{
$I->amInPath('tests/data/sandbox/tests/_data/');
$I->executeCommand('bootstrap --namespace Generated --silent');
$I->seeInShellOutput('Building Guy classes for suites');
$I->seeFileFound('codeception.yml');
$I->seeInThisFile('namespace: Generated');
$I->dontSeeInThisFile('namespace Generated\\');
$this->checkFilesCreated($I);
$I->seeFileFound('WebHelper.php');
$I->seeInThisFile('namespace Generated\Codeception\Module;');
$I->seeFileFound('WebGuy.php');
$I->seeInThisFile('namespace Generated;');
}
protected function checkFilesCreated(\CliGuy $I)
{
$I->seeFileFound('functional.suite.yml','tests');
$I->seeFileFound('acceptance.suite.yml','tests');
$I->seeFileFound('unit.suite.yml','tests');
$I->seeFileFound('_bootstrap.php','tests/acceptance');
$I->seeFileFound('_bootstrap.php','tests/functional');
$I->seeFileFound('_bootstrap.php','tests/unit');
$I->seeFileFound('WebGuy.php','tests/acceptance');
$I->seeFileFound('TestGuy.php','tests/functional');
$I->seeFileFound('CodeGuy.php','tests/unit');
$I->seeFileFound('WebHelper.php','tests/_helpers');
$I->seeFileFound('TestHelper.php','tests/_helpers');
$I->seeFileFound('CodeHelper.php','tests/_helpers');
}
}