| Conditions | 1 |
| Paths | 1 |
| Total Lines | 37 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testCreate() |
||
| 14 | { |
||
| 15 | $applicationConfiguration = $this->getMockWithoutConstructor(ApplicationConfiguration::class); |
||
| 16 | $applicationConfiguration |
||
| 17 | ->expects($this->once()) |
||
| 18 | ->method('getParameter') |
||
| 19 | ->with('fields_mapping') |
||
| 20 | ->willReturn([ |
||
| 21 | '' |
||
| 22 | ]) |
||
| 23 | ; |
||
| 24 | |||
| 25 | $configuration = $this->getMockWithoutConstructor(AdminConfiguration::class); |
||
| 26 | $configuration |
||
| 27 | ->expects($this->once()) |
||
| 28 | ->method('isResolved') |
||
| 29 | ->willReturn(true) |
||
| 30 | ; |
||
| 31 | $configuration |
||
| 32 | ->expects($this->exactly(6)) |
||
| 33 | ->method('getParameter') |
||
| 34 | ->willReturnMap([ |
||
| 35 | ['actions', [ |
||
| 36 | 'my-action' => [], |
||
| 37 | ]], |
||
| 38 | ['translation_pattern', 'test'], |
||
| 39 | ['routing_url_pattern', 'test'], |
||
| 40 | ['max_per_page', 10], |
||
| 41 | ['form', 'FormType'], |
||
| 42 | ]) |
||
| 43 | ; |
||
| 44 | |||
| 45 | $factory = new ConfigurationFactory($applicationConfiguration); |
||
| 46 | $actionConfiguration = $factory->create($configuration); |
||
| 47 | |||
| 48 | $this->assertInstanceOf(ActionConfiguration::class, $actionConfiguration); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |