@@ 113-128 (lines=16) @@ | ||
110 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
111 | * @throws \Nnx\EntryNameResolver\Exception\InvalidContextException |
|
112 | */ |
|
113 | public function testResolveEntryNameByInvalidContext() |
|
114 | { |
|
115 | /** @noinspection PhpIncludeInspection */ |
|
116 | $this->setApplicationConfig( |
|
117 | include TestPaths::getPathToContextResolverAppConfig() |
|
118 | ); |
|
119 | ||
120 | ||
121 | /** @var EntryNameResolverManager $entryNameResolverManager */ |
|
122 | $entryNameResolverManager = $this->getApplicationServiceLocator()->get(EntryNameResolverManagerInterface::class); |
|
123 | ||
124 | /** @var ResolverByClassName $resolverByClassName */ |
|
125 | $resolverByClassName = $entryNameResolverManager->get(ResolverByClassName::class); |
|
126 | ||
127 | $resolverByClassName->resolveEntryNameByContext(\stdClass::class, false); |
|
128 | } |
|
129 | ||
130 | ||
131 | /** |
@@ 105-120 (lines=16) @@ | ||
102 | * @throws \Zend\Stdlib\Exception\LogicException |
|
103 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
104 | */ |
|
105 | public function testResolveEntryNameByInvalidContext() |
|
106 | { |
|
107 | /** @noinspection PhpIncludeInspection */ |
|
108 | $this->setApplicationConfig( |
|
109 | include TestPaths::getPathToContextResolverAppConfig() |
|
110 | ); |
|
111 | ||
112 | ||
113 | /** @var EntryNameResolverManager $entryNameResolverManager */ |
|
114 | $entryNameResolverManager = $this->getApplicationServiceLocator()->get(EntryNameResolverManagerInterface::class); |
|
115 | ||
116 | /** @var ResolverByModuleContextMap $resolverByModuleContextMap */ |
|
117 | $resolverByModuleContextMap = $entryNameResolverManager->get(ResolverByModuleContextMap::class); |
|
118 | ||
119 | $resolverByModuleContextMap->resolveEntryNameByContext('test', false); |
|
120 | } |
|
121 | } |
|
122 |