Skip to content

Commit 28d6dfa

Browse files
committed
replace assertEmpty() with stricter assertions
1 parent 5c227d6 commit 28d6dfa

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Tests/ParameterBagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function testFilter()
253253
'array' => ['bang'],
254254
]);
255255

256-
$this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found');
256+
$this->assertSame('', $bag->filter('nokey'), '->filter() should return empty by default if no key is found');
257257

258258
$this->assertEquals('0123', $bag->filter('digits', '', \FILTER_SANITIZE_NUMBER_INT), '->filter() gets a value of parameter as integer filtering out invalid characters');
259259

Tests/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function testSetNotModified()
127127
ob_start();
128128
$modified->sendContent();
129129
$string = ob_get_clean();
130-
$this->assertEmpty($string);
130+
$this->assertSame('', $string);
131131
}
132132

133133
public function testIsSuccessful()

Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public function testConfigureSchemaTableExistsPdo()
352352
$pdoSessionHandler = new PdoSessionHandler($this->getMemorySqlitePdo());
353353
$pdoSessionHandler->configureSchema($schema, fn () => true);
354354
$table = $schema->getTable('sessions');
355-
$this->assertEmpty($table->getColumns(), 'The table was not overwritten');
355+
$this->assertSame([], $table->getColumns(), 'The table was not overwritten');
356356
}
357357

358358
public static function provideUrlDsnPairs()

Tests/StreamedResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function testSetNotModified()
133133
ob_start();
134134
$modified->sendContent();
135135
$string = ob_get_clean();
136-
$this->assertEmpty($string);
136+
$this->assertSame('', $string);
137137
}
138138

139139
public function testSendInformationalResponse()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy