@@ -162,21 +162,25 @@ public function it_can_create_instance_with_existing_data()
162
162
/** @test */
163
163
public function it_can_process_get_key_with_primary_key ()
164
164
{
165
- $ user = new UserA (['partition ' => 'p ' ]);
165
+ $ user1 = new UserA (['partition ' => 'p ' ]);
166
+ $ user2 = new UserA (['partition ' => "0 " ]);
167
+ $ user3 = new UserA (['partition ' => 0 ]);
166
168
167
- $ this ->assertEquals (['partition ' => 'p ' ], $ user ->getKey ());
169
+ $ this ->assertEquals (['partition ' => 'p ' ], $ user1 ->getKey ());
170
+ $ this ->assertEquals (['partition ' => "0 " ], $ user2 ->getKey ());
171
+ $ this ->assertEquals (['partition ' => 0 ], $ user3 ->getKey ());
168
172
}
169
173
170
-
171
174
/** @test */
172
175
public function it_can_process_get_key_with_primary_key_and_sort_key ()
173
176
{
174
- $ user = new UserB (['partition ' => 'p ' , 'sort ' => 's ' ]);
177
+ $ user1 = new UserB (['partition ' => 'p ' , 'sort ' => 's ' ]);
178
+ $ user2 = new UserB (['partition ' => 'p ' , 'sort ' => "0 " ]);
179
+ $ user3 = new UserB (['partition ' => 'p ' , 'sort ' => 0 ]);
175
180
176
- $ this ->assertEquals ([
177
- 'partition ' => 'p ' ,
178
- 'sort ' => 's '
179
- ], $ user ->getKey ());
181
+ $ this ->assertEquals (['partition ' => 'p ' , 'sort ' => 's ' ], $ user1 ->getKey ());
182
+ $ this ->assertEquals (['partition ' => 'p ' , 'sort ' => "0 " ], $ user2 ->getKey ());
183
+ $ this ->assertEquals (['partition ' => 'p ' , 'sort ' => 0 ], $ user3 ->getKey ());
180
184
}
181
185
182
186
/** @test */
0 commit comments