Skip to content

Commit ec954a5

Browse files
no message
1 parent 0924b26 commit ec954a5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonbInsertTest.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function test_jsonb_insert_nested_path(): void
5050
$this->assertSame('10001', $decoded['address']['zip']);
5151
}
5252

53-
public function test_jsonb_insert_existing_path(): void
53+
public function test_throws_exception_when_inserting_at_existing_object_key(): void
5454
{
5555
$this->expectException(Exception::class);
5656
$dql = 'SELECT JSONB_INSERT(t.object1, :path, :value) as result
@@ -62,15 +62,17 @@ public function test_jsonb_insert_existing_path(): void
6262
]);
6363
}
6464

65-
public function test_jsonb_insert_with_insert_if_missing_true(): void
65+
public function test_throws_exception_when_inserting_at_existing_nested_path(): void
6666
{
6767
$this->expectException(Exception::class);
68-
$dql = "SELECT JSONB_INSERT(t.object1, :path, :value, 'true') as result
69-
FROM Fixtures\\MartinGeorgiev\\Doctrine\\Entity\\ContainsJsons t
70-
WHERE t.id = 1";
68+
69+
$dql = 'SELECT JSONB_INSERT(t.object1, :path, :value) as result
70+
FROM Fixtures\MartinGeorgiev\Doctrine\Entity\ContainsJsons t
71+
WHERE t.id = 5';
72+
7173
$this->executeDqlQuery($dql, [
72-
'path' => '{name}',
73-
'value' => '"John Doe"',
74+
'path' => '{address,zip}',
75+
'value' => '"10001"',
7476
]);
7577
}
7678
}

0 commit comments

Comments
 (0)