source: src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php@ 74c3571

debian/bullseye
Last change on this file since 74c3571 was 74c3571, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

Added gnuboat_mapservice:

it is a REST webservice designed with Apigility to allow the user to upload data, create waters and so on

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[74c3571]1<?php
2/**
3 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
4 * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
5 */
6
7namespace ApplicationTest\Controller;
8
9use Application\Controller\IndexController;
10use Zend\Stdlib\ArrayUtils;
11use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
12
13/**
14 * Name is intentional, to force it to run last; this was necessary as,
15 * once the Admin module is loaded, the controller is able to find it and
16 * will attempt the redirect.
17 */
18class ZZIndexControllerDevModeTest extends AbstractHttpControllerTestCase
19{
20 public function setUp()
21 {
22 // The module configuration should still be applicable for tests.
23 // You can override configuration here with test case specific values,
24 // such as sample view templates, path stacks, module_listener_options,
25 // etc.
26 $configOverrides = [
27 'modules' => [
28 'ZF\Apigility\Admin',
29 'ZF\Apigility\Admin\Ui',
30 ],
31 'module_listener_options' => [
32 'config_cache_enabled' => false,
33 'config_glob_paths' => [
34 __DIR__ . '/../../../../config/autoload/{,*.}{global,local}.php',
35 __DIR__ . '/../../../../config/autoload/{,*.}{global,local}-development.php',
36 ],
37 ]
38 ];
39
40 $this->setApplicationConfig(ArrayUtils::merge(
41 include __DIR__ . '/../../../../config/application.config.php',
42 $configOverrides
43 ));
44
45 parent::setUp();
46 }
47
48 public function testIndexActionRedirectsToAdminUi()
49 {
50 $this->dispatch('/', 'GET');
51 $this->assertResponseStatusCode(302);
52 $this->assertRedirectRegex('#/ui$#');
53 }
54}
Note: See TracBrowser for help on using the repository browser.