Skip to content

Commit 660ebb4

Browse files
Naktibaldasamdark
authored andcommitted
Upgrade to Codeception 4.0 (yiisoft#218)
* Use modular Codeception 4.0 * Moved bootstrap setting to top level Because old location is deprecated See https://bit.ly/2YrRzVc * Use stringContainsString instead of contains Because using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. * Removed 5.4 and 5.5
1 parent 7e643e7 commit 660ebb4

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ matrix:
88
- php: "7.1"
99
- php: "7.0"
1010
- php: "5.6"
11-
- php: "5.5"
12-
dist: trusty
13-
- php: "5.4"
14-
dist: trusty
1511

1612
# faster builds on new travis setup not using sudo
1713
sudo: false

codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
actor: Tester
2+
bootstrap: _bootstrap.php
23
paths:
34
tests: tests
45
log: tests/_output
56
data: tests/_data
67
helpers: tests/_support
78
settings:
8-
bootstrap: _bootstrap.php
99
memory_limit: 1024M
1010
colors: true
1111
modules:

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
"yiisoft/yii2-debug": "~2.1.0",
2424
"yiisoft/yii2-gii": "~2.1.0",
2525
"yiisoft/yii2-faker": "~2.0.0",
26-
27-
"codeception/base": "~2.3.0",
28-
"codeception/verify": "~0.4.0",
26+
"codeception/codeception": "4.0.x-dev | ^4.0",
27+
"codeception/verify": "~0.5.0 || ~1.1.0",
2928
"codeception/specify": "~0.4.6",
30-
"symfony/browser-kit": ">=2.7 <=4.2.4"
29+
"symfony/browser-kit": ">=2.7 <=4.2.4",
30+
"codeception/module-filesystem": "^1.0.0",
31+
"codeception/module-yii2": "^1.0.0",
32+
"codeception/module-asserts": "^1.0.0"
3133
},
3234
"config": {
3335
"process-timeout": 1800,

tests/unit/models/ContactFormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public function testEmailIsSentOnContact()
4343
expect($emailMessage->getFrom())->hasKey('noreply@example.com');
4444
expect($emailMessage->getReplyTo())->hasKey('tester@example.com');
4545
expect($emailMessage->getSubject())->equals('very important letter subject');
46-
expect($emailMessage->toString())->contains('body of current message');
46+
expect($emailMessage->toString())->stringContainsString('body of current message');
4747
}
4848
}

0 commit comments

Comments
 (0)