Skip to content

Commit 73bb182

Browse files
committed
Refactor the tests.
1 parent 2d9f598 commit 73bb182

File tree

10 files changed

+1238
-0
lines changed

10 files changed

+1238
-0
lines changed

codeception.dist.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
actor_suffix: Tester
2+
paths:
3+
tests: tests
4+
data: tests/_data
5+
log: tests/_output
6+
support: tests/_support
7+
envs: tests/_envs
8+
settings:
9+
bootstrap: _bootstrap.php
10+
colors: true
11+
memory_limit: 1024M
12+
lint: true
13+
extensions:
14+
enabled:
15+
- Codeception\Extension\RunFailed
16+
coverage:
17+
enabled: true
18+
include:
19+
- src/*

tests/_data/.gitkeep

Whitespace-only changes.

tests/_support/Helper/Unit.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
namespace Helper;
6+
7+
// here you can define custom actions
8+
// all public methods declared in helper class will be available in $I
9+
10+
class Unit extends \Codeception\Module
11+
{
12+
}

tests/_support/UnitTester.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
/**
6+
* Inherited Methods.
7+
*
8+
* @method void wantToTest($text)
9+
* @method void wantTo($text)
10+
* @method void execute($callable)
11+
* @method void expectTo($prediction)
12+
* @method void expect($prediction)
13+
* @method void amGoingTo($argumentation)
14+
* @method void am($role)
15+
* @method void lookForwardTo($achieveValue)
16+
* @method void comment($description)
17+
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
18+
*
19+
* @SuppressWarnings(PHPMD)
20+
*/
21+
class UnitTester extends \Codeception\Actor
22+
{
23+
use _generated\UnitTesterActions;
24+
25+
// Define custom actions here
26+
}

0 commit comments

Comments
 (0)