We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 1 |
| Paths | 1 |
| Total Lines | 37 |
| Code Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function testSaveReorderTree() |
||
| 15 | { |
||
| 16 | $this->createReorderItems(); |
||
| 17 | $this->crudPanel->setModel(Reorder::class); |
||
| 18 | |||
| 19 | $this->crudPanel->updateTreeOrder( |
||
| 20 | [ |
||
| 21 | [ |
||
| 22 | 'item_id' => 1, |
||
| 23 | 'parent_id' => null, |
||
| 24 | 'depth' => 1, |
||
| 25 | 'left' => 2, |
||
| 26 | 'right' => 7, |
||
| 27 | ], |
||
| 28 | [ |
||
| 29 | 'item_id' => 2, |
||
| 30 | 'parent_id' => 1, |
||
| 31 | 'depth' => 2, |
||
| 32 | 'left' => 3, |
||
| 33 | 'right' => 4, |
||
| 34 | ], |
||
| 35 | [ |
||
| 36 | 'item_id' => 3, |
||
| 37 | 'parent_id' => 1, |
||
| 38 | 'depth' => 2, |
||
| 39 | 'left' => 5, |
||
| 40 | 'right' => 6, |
||
| 41 | ], |
||
| 42 | ] |
||
| 43 | ); |
||
| 44 | |||
| 45 | $this->assertDatabaseHas('reorders', [ |
||
| 46 | 'id' => 1, |
||
| 47 | 'parent_id' => null, |
||
| 48 | 'lft' => 2, |
||
| 49 | 'rgt' => 7, |
||
| 50 | 'depth' => 1, |
||
| 51 | ]); |
||
| 85 |