@@ -92,9 +92,7 @@ public function it_updates_a_subset_of_a_doc()
9292 $ doc = [
9393 'some ' => [
9494 'prop ' => 'foo ' ,
95- 'other ' => [
96- 'nested ' => 42
97- ]
95+ 'other ' => 'bar ' ,
9896 ],
9997 'baz ' => 'bat ' ,
10098 ];
@@ -108,7 +106,7 @@ public function it_updates_a_subset_of_a_doc()
108106 ]);
109107
110108 $ filteredDocs = array_values (iterator_to_array ($ this ->store ->findDocs ('test ' , new EqFilter ('some.prop ' , 'fuzz ' ))));
111- $ this ->assertEquals ( 42 , $ filteredDocs [0 ]['some ' ][ ' other ' ][ ' nested ' ]);
109+ $ this ->assertArrayNotHasKey ( ' other ' , $ filteredDocs [0 ]['some ' ]);
112110 }
113111
114112 /**
@@ -424,6 +422,7 @@ public function it_ensures_unique_constraints_for_multiple_fields()
424422
425423 $ this ->store ->addDoc ('test ' , '1 ' , ['some ' => ['prop ' => 'foo ' , 'other ' => ['prop ' => 'bat ' ]]]);
426424 $ this ->store ->addDoc ('test ' , '2 ' , ['some ' => ['prop ' => 'bar ' , 'other ' => ['prop ' => 'bat ' ]]]);
425+ $ this ->store ->addDoc ('test ' , '3 ' , ['some ' => ['prop ' => 'bar ' ]]);
427426
428427 $ this ->expectExceptionMessageRegExp ('/^Unique constraint violation/ ' );
429428 $ this ->store ->addDoc ('test ' , '4 ' , ['some ' => ['prop ' => 'foo ' , 'other ' => ['prop ' => 'bat ' ]]]);
@@ -443,7 +442,7 @@ public function it_ensures_unique_constraints_for_multiple_fields_for_update()
443442 $ this ->store ->addDoc ('test ' , '3 ' , ['some ' => ['prop ' => 'bar ' ]]);
444443
445444 $ this ->expectExceptionMessageRegExp ('/^Unique constraint violation/ ' );
446- $ this ->store ->updateDoc ('test ' , '2 ' , ['some ' => ['prop ' => 'foo ' ]]);
445+ $ this ->store ->updateDoc ('test ' , '2 ' , ['some ' => ['prop ' => 'foo ' , ' other ' => [ ' prop ' => ' bat ' ] ]]);
447446 }
448447
449448 /**
@@ -574,7 +573,7 @@ public function it_deletes_many()
574573 /**
575574 * @test
576575 */
577- public function it_does_not_update_numeric_arrays_recursively ()
576+ public function it_does_not_update_arrays_recursively ()
578577 {
579578 $ this ->store ->addCollection ('test ' );
580579
@@ -604,13 +603,13 @@ public function it_does_not_update_numeric_arrays_recursively()
604603
605604 $ this ->assertEquals (
606605 [
607- 'a ' => ['a ' => 10 , ' b ' => 21 , 'c ' => 30 ],
606+ 'a ' => ['b ' => 21 , 'c ' => 30 ],
608607 'b ' => [10 , 30 ],
609608 'c ' => [true ],
610609 'd ' => [],
611- 'e ' => [' a ' => ' b ' ],
612- 'f ' => [10 , 20 , 'x ' => 10 , 'y ' => 20 ],
613- 'g ' => [' x ' => 10 , ' y ' => 20 , 30 , 40 ],
610+ 'e ' => [],
611+ 'f ' => ['x ' => 10 , 'y ' => 20 ],
612+ 'g ' => [30 , 40 ],
614613 'h ' => [11 ],
615614 'i ' => [22 ],
616615 'j ' => ['bar ' ]
0 commit comments