Fix empty array check
This commit is contained in:
@@ -33,6 +33,19 @@ class ParametersTest extends TestCase
|
||||
'JSON parameter not constructed correctly');
|
||||
}
|
||||
|
||||
public function testJsonSucceedsForArrayWithEmptyArrayParameter(): void
|
||||
{
|
||||
$this->assertEquals([':it' => '{"id":18,"urls":[]}'], Parameters::json(':it', ['id' => 18, 'urls' => []]),
|
||||
'JSON parameter not constructed correctly');
|
||||
}
|
||||
|
||||
#[TestDox('json succeeds for 1D array with empty array parameter')]
|
||||
public function testJsonSucceedsFor1DArrayWithEmptyArrayParameter(): void
|
||||
{
|
||||
$this->assertEquals([':it' => '{"urls":[]}'], Parameters::json(':it', ['urls' => []]),
|
||||
'JSON parameter not constructed correctly');
|
||||
}
|
||||
|
||||
#[TestDox('json succeeds for stdClass')]
|
||||
public function testJsonSucceedsForStdClass(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user