@@ -8,28 +8,28 @@ public function testPeriodicExampleWithPipedInputEndsBecauseInputEnds()
8
8
{
9
9
$ output = $ this ->execExample ('echo hello | php 01-periodic.php ' );
10
10
11
- $ this ->assertContains ('you just said: hello\n ' , $ output );
11
+ $ this ->assertContainsString ('you just said: hello\n ' , $ output );
12
12
}
13
13
14
14
public function testPeriodicExampleWithNullInputQuitsImmediately ()
15
15
{
16
16
$ output = $ this ->execExample ('php 01-periodic.php < /dev/null ' );
17
17
18
- $ this ->assertNotContains ('you just said: ' , $ output );
18
+ $ this ->assertNotContainsString ('you just said: ' , $ output );
19
19
}
20
20
21
21
public function testPeriodicExampleWithNoInputQuitsImmediately ()
22
22
{
23
23
$ output = $ this ->execExample ('true | php 01-periodic.php ' );
24
24
25
- $ this ->assertNotContains ('you just said: ' , $ output );
25
+ $ this ->assertNotContainsString ('you just said: ' , $ output );
26
26
}
27
27
28
28
public function testPeriodicExampleWithSleepNoInputQuitsOnEnd ()
29
29
{
30
30
$ output = $ this ->execExample ('sleep 0.1 | php 01-periodic.php ' );
31
31
32
- $ this ->assertNotContains ('you just said: ' , $ output );
32
+ $ this ->assertNotContainsString ('you just said: ' , $ output );
33
33
}
34
34
35
35
public function testPeriodicExampleWithClosedInputQuitsImmediately ()
@@ -40,7 +40,7 @@ public function testPeriodicExampleWithClosedInputQuitsImmediately()
40
40
$ this ->markTestIncomplete ('Your platform exhibits a closed STDIN bug, this may need some further debugging ' );
41
41
}
42
42
43
- $ this ->assertNotContains ('you just said: ' , $ output );
43
+ $ this ->assertNotContainsString ('you just said: ' , $ output );
44
44
}
45
45
46
46
public function testPeriodicExampleWithClosedInputAndOutputQuitsImmediatelyWithoutOutput ()
@@ -58,28 +58,28 @@ public function testBindingsExampleWithPipedInputEndsBecauseInputEnds()
58
58
{
59
59
$ output = $ this ->execExample ('echo test | php 04-bindings.php ' );
60
60
61
- $ this ->assertContains ('you just said: test (4) ' . PHP_EOL , $ output );
61
+ $ this ->assertContainsString ('you just said: test (4) ' . PHP_EOL , $ output );
62
62
}
63
63
64
64
public function testBindingsExampleWithPipedInputEndsWithSpecialBindingsReplacedBecauseInputEnds ()
65
65
{
66
66
$ output = $ this ->execExample ('echo hello | php 04-bindings.php ' );
67
67
68
- $ this ->assertContains ('you just said: hellö (6) ' . PHP_EOL , $ output );
68
+ $ this ->assertContainsString ('you just said: hellö (6) ' . PHP_EOL , $ output );
69
69
}
70
70
71
71
public function testStubShowStdinIsReadableByDefault ()
72
72
{
73
73
$ output = $ this ->execExample ('php ../tests/stub/01-check-stdin.php ' );
74
74
75
- $ this ->assertContains ('YES ' , $ output );
75
+ $ this ->assertContainsString ('YES ' , $ output );
76
76
}
77
77
78
78
public function testStubCanCloseStdinAndIsNotReadable ()
79
79
{
80
80
$ output = $ this ->execExample ('php ../tests/stub/02-close-stdin.php ' );
81
81
82
- $ this ->assertContains ('NO ' , $ output );
82
+ $ this ->assertContainsString ('NO ' , $ output );
83
83
}
84
84
85
85
public function testStubCanCloseStdoutAndIsNotWritable ()
@@ -113,7 +113,7 @@ public function testPeriodicExampleViaInteractiveModeQuitsImmediately()
113
113
114
114
// starts with either "Interactive mode enabled" or "Interactive shell"
115
115
$ this ->assertStringStartsWith ('Interactive ' , $ output );
116
- $ this ->assertNotContains ('you just said: ' , $ output );
116
+ $ this ->assertNotContainsString ('you just said: ' , $ output );
117
117
}
118
118
119
119
private function execExample ($ command )
0 commit comments