|
@@ 88-106 (lines=19) @@
|
| 85 |
|
$adminFactory->createFromRequest($request); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
public function testCreateFromRequestWithoutRouteParams() |
| 89 |
|
{ |
| 90 |
|
$resourceCollection = $this->getMockWithoutConstructor(ResourceCollection::class); |
| 91 |
|
$eventDispatcher = $this->getMockWithoutConstructor(EventDispatcherInterface::class); |
| 92 |
|
$configurationFactory = $this->getMockWithoutConstructor(ConfigurationFactory::class); |
| 93 |
|
$applicationConfigurationStorage = $this->getMockWithoutConstructor(ApplicationConfigurationStorage::class); |
| 94 |
|
|
| 95 |
|
$request = new Request(); |
| 96 |
|
|
| 97 |
|
$adminFactory = new AdminFactory( |
| 98 |
|
$resourceCollection, |
| 99 |
|
$eventDispatcher, |
| 100 |
|
$configurationFactory, |
| 101 |
|
$applicationConfigurationStorage |
| 102 |
|
); |
| 103 |
|
|
| 104 |
|
$this->expectException(Exception::class); |
| 105 |
|
$adminFactory->createFromRequest($request); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function testCreateFromRequestWithoutAdminParams() |
| 109 |
|
{ |
|
@@ 108-128 (lines=21) @@
|
| 105 |
|
$adminFactory->createFromRequest($request); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function testCreateFromRequestWithoutAdminParams() |
| 109 |
|
{ |
| 110 |
|
$resourceCollection = $this->getMockWithoutConstructor(ResourceCollection::class); |
| 111 |
|
$eventDispatcher = $this->getMockWithoutConstructor(EventDispatcherInterface::class); |
| 112 |
|
$configurationFactory = $this->getMockWithoutConstructor(ConfigurationFactory::class); |
| 113 |
|
$applicationConfigurationStorage = $this->getMockWithoutConstructor(ApplicationConfigurationStorage::class); |
| 114 |
|
|
| 115 |
|
$request = new Request([ |
| 116 |
|
'_route_params' => [], |
| 117 |
|
]); |
| 118 |
|
|
| 119 |
|
$adminFactory = new AdminFactory( |
| 120 |
|
$resourceCollection, |
| 121 |
|
$eventDispatcher, |
| 122 |
|
$configurationFactory, |
| 123 |
|
$applicationConfigurationStorage |
| 124 |
|
); |
| 125 |
|
|
| 126 |
|
$this->expectException(Exception::class); |
| 127 |
|
$adminFactory->createFromRequest($request); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
public function testCreateFromRequestWithoutExistingAdmin() |
| 131 |
|
{ |