Conditions | 1 |
Paths | 1 |
Total Lines | 39 |
Code Lines | 28 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
33 | ] |
||
34 | ); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @test |
||
39 | */ |
||
40 | public function it_has_default_authorization_checker() |
||
41 | { |
||
42 | $this->assertProcessedConfigurationEquals( |
||
43 | [ |
||
44 | [] |
||
45 | ], |
||
46 | ['authorization_checker' => 'sylius.resource_controller.authorization_checker.disabled'], |
||
47 | 'authorization_checker' |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @test |
||
53 | */ |
||
54 | public function its_authorization_checker_can_be_customized() |
||
55 | { |
||
56 | $this->assertProcessedConfigurationEquals( |
||
57 | [ |
||
58 | ['authorization_checker' => 'custom_service'] |
||
59 | ], |
||
60 | ['authorization_checker' => 'custom_service'], |
||
61 | 'authorization_checker' |
||
62 | ); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @test |
||
67 | */ |
||
68 | public function its_authorization_checker_cannot_be_empty() |
||
69 | { |
||
70 | $this->assertPartialConfigurationIsInvalid( |
||
71 | [ |
||
72 | ['authorization_checker' => ''] |
||
86 |