@@ -28,7 +28,7 @@ class PhpfastcacheSetCommandTest extends CommandTestCase
2828 public function setUp ()
2929 {
3030 CacheManager::clearInstances ();
31- putenv ('COLUMNS=200 ' );
31+ putenv ('COLUMNS=200 ' );// Prevent broken console rendering with unit tests
3232 parent ::setUp ();
3333 }
3434
@@ -49,7 +49,7 @@ public function testCommandSetCacheItem()
4949 '--no-interaction ' => true
5050 ]);
5151
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 ());
5353 }
5454
5555 public function testCommandSetCacheItemWithAutomaticTypeCastingBoolean ()
@@ -70,7 +70,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingBoolean()
7070 '--no-interaction ' => true
7171 ]);
7272
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 ());
7474 $ this ->assertContains ('(automatically type-casted to boolean) ' , $ commandTester ->getDisplay (), true );
7575 }
7676
@@ -92,7 +92,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingInteger()
9292 '--no-interaction ' => true
9393 ]);
9494
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 ());
9696 $ this ->assertContains ('(automatically type-casted to integer) ' , $ commandTester ->getDisplay (), true );
9797 }
9898
@@ -114,7 +114,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingFloat()
114114 '--no-interaction ' => true
115115 ]);
116116
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 ());
118118 $ this ->assertContains ('(automatically type-casted to double) ' , $ commandTester ->getDisplay (), true );
119119 }
120120
@@ -136,7 +136,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingNull()
136136 '--no-interaction ' => true
137137 ]);
138138
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 ());
140140 $ this ->assertContains ('(automatically type-casted to NULL) ' , $ commandTester ->getDisplay (), true );
141141 }
142142
@@ -158,7 +158,7 @@ public function testCommandSetCacheItemWithAutomaticTypeCastingJson()
158158 '--no-interaction ' => true
159159 ]);
160160
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 ());
162162 $ this ->assertContains ('(automatically type-casted to array) ' , $ commandTester ->getDisplay (), true );
163163 }
164164
@@ -180,7 +180,7 @@ public function testCommandSetCacheItemWithoutAutomaticTypeCasting()
180180 '--no-interaction ' => true
181181 ]);
182182
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 ());
184184 $ this ->assertNotContains ('(automatically type-casted to NULL) ' , $ commandTester ->getDisplay (), true );
185185 }
186186
0 commit comments