|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
/** |
|
5
|
|
|
* Inherited Methods |
|
6
|
|
|
* @method void wantToTest($text) |
|
7
|
|
|
* @method void wantTo($text) |
|
8
|
|
|
* @method void execute($callable) |
|
9
|
|
|
* @method void expectTo($prediction) |
|
10
|
|
|
* @method void expect($prediction) |
|
11
|
|
|
* @method void amGoingTo($argumentation) |
|
12
|
|
|
* @method void am($role) |
|
13
|
|
|
* @method void lookForwardTo($achieveValue) |
|
14
|
|
|
* @method void comment($description) |
|
15
|
|
|
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) |
|
16
|
|
|
* |
|
17
|
|
|
* @SuppressWarnings(PHPMD) |
|
18
|
|
|
*/ |
|
19
|
|
|
class AcceptanceTester extends \Codeception\Actor |
|
|
|
|
|
|
20
|
|
|
{ |
|
21
|
|
|
use _generated\AcceptanceTesterActions; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Define custom actions here |
|
25
|
|
|
*/ |
|
26
|
|
|
/** |
|
27
|
|
|
* @Given There is no task named :arg1 |
|
28
|
|
|
*/ |
|
29
|
|
|
public function thereIsNoTaskNamed($arg1) |
|
30
|
|
|
{ |
|
31
|
|
|
// $this->amOnPage('/task/list'); |
|
|
|
|
|
|
32
|
|
|
// $this->cantSee($arg1); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @When I create a new task named :arg1 |
|
37
|
|
|
*/ |
|
38
|
|
|
public function iCreateANewTaskNamed($arg1) |
|
39
|
|
|
{ |
|
40
|
|
|
// $this->amOnPage('/task/create'); |
|
|
|
|
|
|
41
|
|
|
// $this->fillField('create_task_form[name]', $arg1); |
|
42
|
|
|
// $this->click('create_task_form[submit]'); |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @Then The task :arg1 should be created |
|
47
|
|
|
*/ |
|
48
|
|
|
public function theTaskShouldBeCreated($arg1) |
|
49
|
|
|
{ |
|
50
|
|
|
// $this->amOnPage('/task/list'); |
|
|
|
|
|
|
51
|
|
|
// $this->see($arg1); |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @Then The status of task :arg1 should be :arg2 |
|
56
|
|
|
*/ |
|
57
|
|
|
public function theStatusOfTaskShouldBe($arg1, $arg2) |
|
58
|
|
|
{ |
|
59
|
|
|
// $this->amOnPage('/task/list'); |
|
|
|
|
|
|
60
|
|
|
// $this->see($arg1 . ' (' . $arg2 . ')'); |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @Given There is a task named :arg1 |
|
65
|
|
|
*/ |
|
66
|
|
|
public function thereIsATaskNamed($arg1) |
|
67
|
|
|
{ |
|
68
|
|
|
// $this->amOnPage('/task/list'); |
|
|
|
|
|
|
69
|
|
|
// $this->see($arg1); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @Then The new task :arg1 should not be created |
|
74
|
|
|
*/ |
|
75
|
|
|
public function theNewTaskShouldNotBeCreated($arg1) |
|
76
|
|
|
{ |
|
77
|
|
|
// $this->see($arg1 . " is already existed"); |
|
|
|
|
|
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
} |
|
81
|
|
|
|