/** * * @return void */ public function testLoadModule() { /** @noinspection PhpIncludeInspection */ $this->setApplicationConfig(include TestPaths::getPathToIntegrationTest()); $this->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $e) { $exception = $e->getParam('exception', null); if ($exception) { throw $exception; } }); $this->assertModulesLoaded(['OldTown\\Workflow\\ZF2\\Dispatch']); }
/** * * @return void */ public function testDispatch() { /** @noinspection PhpIncludeInspection */ $this->setApplicationConfig(include TestPaths::getPathToIntegrationTest()); $this->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $e) { $exception = $e->getParam('exception', null); if ($exception) { throw $exception; } }); $this->dispatch('test'); }
<?php use OldTown\Workflow\ZF2\Dispatch\PhpUnit\TestData\TestPaths; return ['modules' => ['OldTown\\Workflow\\ZF2', 'OldTown\\Workflow\\ZF2\\Dispatch'], 'module_listener_options' => ['module_paths' => ['OldTown\\Workflow\\ZF2\\Dispatch' => TestPaths::getPathToModule()], 'config_glob_paths' => [__DIR__ . '/config/autoload/{{,*.}global,{,*.}local}.php']]];