Conditions | 1 |
Paths | 1 |
Total Lines | 28 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function testLoad() |
||
25 | { |
||
26 | $loader = new ApiCoreRoutingLoader( |
||
27 | [ |
||
28 | [ |
||
29 | 'entity' => MyModel::class, |
||
30 | 'name' => 'resource', |
||
31 | 'strategies' => [ |
||
32 | 'index' => 'test', |
||
33 | 'item' => 'test', |
||
34 | 'filter' => 'test', |
||
35 | 'create' => 'test', |
||
36 | 'update' => 'test', |
||
37 | 'delete' => 'test' |
||
38 | ], |
||
39 | 'request_processor' => 'test', |
||
40 | 'default_sort' => 'test', |
||
41 | 'default_sort_direction' => 'test' |
||
42 | ] |
||
43 | ], |
||
44 | ['en'], |
||
45 | ['en'] |
||
46 | ); |
||
47 | |||
48 | $collection = $loader->load(''); |
||
49 | |||
50 | $this->assertInstanceOf(RouteCollection::class, $collection); |
||
51 | $this->assertCount(6, $collection); |
||
52 | } |
||
53 | } |