Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | public function validateJsonWithoutHexing() |
||
12 | { |
||
13 | $userId = md5(20000, true); |
||
14 | /** |
||
15 | * @var $model TestBinaryUser |
||
16 | */ |
||
17 | $model = TestBinaryUser::find([ |
||
18 | 'user_id' => $userId, |
||
19 | 'organization_id' => 100, |
||
20 | ]); |
||
21 | $this->assertNotNull($model); |
||
22 | $this->assertInstanceOf(TestBinaryUser::class, $model); |
||
23 | $json = $model->toJson(); |
||
24 | $array = json_decode($json, true); |
||
25 | $this->assertEquals(bin2hex($userId), $array['user_id']); |
||
26 | } |
||
46 |