@@ -28,7 +28,7 @@ class PhpfastcacheSetCommandTest extends CommandTestCase
28
28
public function setUp ()
29
29
{
30
30
CacheManager::clearInstances ();
31
- putenv ('COLUMNS=200 ' );
31
+ putenv ('COLUMNS=200 ' );// Prevent broken console rendering with unit tests
32
32
parent ::setUp ();
33
33
}
34
34
@@ -49,7 +49,7 @@ public function testCommandSetCacheItem()
49
49
'--no-interaction ' => true
50
50
]);
51
51
52
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
52
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
53
53
}
54
54
55
55
public function testCommandSetCacheItemWithAutomaticTypeCastingBoolean ()
@@ -70,7 +70,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingBoolean()
70
70
'--no-interaction ' => true
71
71
]);
72
72
73
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
73
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
74
74
$ this ->assertContains ('(automatically type-casted to boolean) ' , $ commandTester ->getDisplay (), true );
75
75
}
76
76
@@ -92,7 +92,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingInteger()
92
92
'--no-interaction ' => true
93
93
]);
94
94
95
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
95
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
96
96
$ this ->assertContains ('(automatically type-casted to integer) ' , $ commandTester ->getDisplay (), true );
97
97
}
98
98
@@ -114,7 +114,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingFloat()
114
114
'--no-interaction ' => true
115
115
]);
116
116
117
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
117
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
118
118
$ this ->assertContains ('(automatically type-casted to double) ' , $ commandTester ->getDisplay (), true );
119
119
}
120
120
@@ -136,7 +136,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingNull()
136
136
'--no-interaction ' => true
137
137
]);
138
138
139
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
139
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
140
140
$ this ->assertContains ('(automatically type-casted to NULL) ' , $ commandTester ->getDisplay (), true );
141
141
}
142
142
@@ -158,7 +158,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingJson()
158
158
'--no-interaction ' => true
159
159
]);
160
160
161
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
161
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
162
162
$ this ->assertContains ('(automatically type-casted to array) ' , $ commandTester ->getDisplay (), true );
163
163
}
164
164
@@ -180,7 +180,7 @@ public function testCommandSetCacheItemWithoutAutomaticTypeCasting()
180
180
'--no-interaction ' => true
181
181
]);
182
182
183
- $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl , $ commandTester ->getDisplay ());
183
+ $ this ->assertContains ('Cache item " ' . $ key . '" set to " ' . $ value . '" for ' . $ ttl . ' seconds ' , $ commandTester ->getDisplay ());
184
184
$ this ->assertNotContains ('(automatically type-casted to NULL) ' , $ commandTester ->getDisplay (), true );
185
185
}
186
186
0 commit comments