Completed
Push — master ( fcd67e...61bcd3 )
by Aimeos
02:31
created
controller/frontend/tests/Controller/Frontend/Service/FactoryTest.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
 {
13 13
 	public function testCreateControllerInvalidImplementation()
14 14
 	{
15
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
16
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
15
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
16
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
17 17
 	}
18 18
 
19 19
 	public function testCreateControllerInvalidName()
20 20
 	{
21
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
22
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
21
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
22
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), '%^');
23 23
 	}
24 24
 
25 25
 	public function testCreateControllerNotExisting()
26 26
 	{
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
28
-		\Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
28
+		\Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
29 29
 	}
30 30
 
31 31
 	public function testAbstractAddControllerDecoratorsWithExclude()
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
 		$context = \TestHelperFrontend::getContext();
34 34
 		$config = $context->getConfig();
35 35
 
36
-		$config->set( 'controller/frontend/common/decorators/default', array( 'Example' ) );
37
-		$config->set( 'controller/frontend/service/decorators/excludes', array( 'Example' ) );
36
+		$config->set('controller/frontend/common/decorators/default', array('Example'));
37
+		$config->set('controller/frontend/service/decorators/excludes', array('Example'));
38 38
 
39
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( $context, 'Standard' );
39
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard');
40 40
 
41
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Frontend\\Common\\Iface', $controller );
41
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Frontend\\Common\\Iface', $controller);
42 42
 	}
43 43
 
44 44
 	// using Factorylocal class
45 45
 	public function testAbstractAddControllerDecoratorsNoDomainException()
46 46
 	{
47
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
48
-		\Aimeos\Controller\Frontend\Service\Factorylocal::createController( \TestHelperFrontend::getContext(), 'Standard', '' );
47
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
48
+		\Aimeos\Controller\Frontend\Service\Factorylocal::createController(\TestHelperFrontend::getContext(), 'Standard', '');
49 49
 	}
50 50
 
51 51
 	public function testAbstractAddDecorators()
@@ -53,47 +53,47 @@  discard block
 block discarded – undo
53 53
 		$context = \TestHelperFrontend::getContext();
54 54
 		$config = $context->getConfig();
55 55
 
56
-		$config->set( 'controller/frontend/common/decorators/default', array( 'Example', 'Example' ) );
57
-		$config->set( 'controller/frontend/service/decorators/excludes', array() );
56
+		$config->set('controller/frontend/common/decorators/default', array('Example', 'Example'));
57
+		$config->set('controller/frontend/service/decorators/excludes', array());
58 58
 
59
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( $context, 'Standard' );
59
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard');
60 60
 
61
-		$this->assertInstanceOf( '\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\Iface', $controller );
61
+		$this->assertInstanceOf('\\Aimeos\\Controller\\Frontend\\Common\\Decorator\\Iface', $controller);
62 62
 	}
63 63
 
64 64
 	public function testAbstractAddDecoratorsExceptionWrongName()
65 65
 	{
66 66
 		$context = \TestHelperFrontend::getContext();
67 67
 		$config = $context->getConfig();
68
-		$config->set( 'controller/frontend/common/decorators/default', array( '$$' ) );
68
+		$config->set('controller/frontend/common/decorators/default', array('$$'));
69 69
 
70
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
71
-		\Aimeos\Controller\Frontend\Service\Factory::createController( $context, 'Standard' );
70
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
71
+		\Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard');
72 72
 	}
73 73
 
74 74
 	public function testAbstractAddDecoratorsExceptionWrongClass()
75 75
 	{
76 76
 		$context = \TestHelperFrontend::getContext();
77 77
 		$config = $context->getConfig();
78
-		$config->set( 'controller/frontend/common/decorators/default', array( 'WrongClass' ) );
78
+		$config->set('controller/frontend/common/decorators/default', array('WrongClass'));
79 79
 
80
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
81
-		\Aimeos\Controller\Frontend\Service\Factory::createController( $context, 'Standard' );
80
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
81
+		\Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard');
82 82
 	}
83 83
 
84 84
 	public function testCreateController()
85 85
 	{
86 86
 		$context = \TestHelperFrontend::getContext();
87 87
 		$config = $context->getConfig();
88
-		$config->set( 'controller/frontend/common/decorators/default', array() );
88
+		$config->set('controller/frontend/common/decorators/default', array());
89 89
 
90 90
 		$target = '\\Aimeos\\Controller\\Frontend\\Service\\Iface';
91 91
 
92
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext() );
93
-		$this->assertInstanceOf( $target, $controller );
92
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext());
93
+		$this->assertInstanceOf($target, $controller);
94 94
 
95
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
96
-		$this->assertInstanceOf( $target, $controller );
95
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
96
+		$this->assertInstanceOf($target, $controller);
97 97
 	}
98 98
 
99 99
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Service/StandardTest.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -16,130 +16,130 @@  discard block
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$this->object = new \Aimeos\Controller\Frontend\Service\Standard( \TestHelperFrontend::getContext() );
19
+		$this->object = new \Aimeos\Controller\Frontend\Service\Standard(\TestHelperFrontend::getContext());
20 20
 	}
21 21
 
22 22
 
23 23
 	public static function setUpBeforeClass()
24 24
 	{
25
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
26
-		$orderBaseMgr = $orderManager->getSubManager( 'base' );
25
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
26
+		$orderBaseMgr = $orderManager->getSubManager('base');
27 27
 		self::$basket = $orderBaseMgr->createItem();
28 28
 	}
29 29
 
30 30
 
31 31
 	protected function tearDown()
32 32
 	{
33
-		unset( $this->object );
33
+		unset($this->object);
34 34
 	}
35 35
 
36 36
 
37 37
 	public function testGetServices()
38 38
 	{
39
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
40
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
39
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
40
+		$basket = $orderManager->getSubManager('base')->createItem();
41 41
 
42
-		$services = $this->object->getServices( 'delivery', $basket );
43
-		$this->assertGreaterThan( 0, count( $services ) );
42
+		$services = $this->object->getServices('delivery', $basket);
43
+		$this->assertGreaterThan(0, count($services));
44 44
 
45
-		foreach( $services as $service ) {
46
-			$this->assertInstanceOf( '\\Aimeos\\MShop\\Service\\Item\\Iface', $service );
45
+		foreach ($services as $service) {
46
+			$this->assertInstanceOf('\\Aimeos\\MShop\\Service\\Item\\Iface', $service);
47 47
 		}
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testGetServicesCache()
52 52
 	{
53
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
54
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
53
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
54
+		$basket = $orderManager->getSubManager('base')->createItem();
55 55
 
56
-		$this->object->getServices( 'delivery', $basket );
57
-		$services = $this->object->getServices( 'delivery', $basket );
56
+		$this->object->getServices('delivery', $basket);
57
+		$services = $this->object->getServices('delivery', $basket);
58 58
 
59
-		$this->assertGreaterThan( 0, count( $services ) );
59
+		$this->assertGreaterThan(0, count($services));
60 60
 	}
61 61
 
62 62
 
63 63
 	public function testGetServiceAttributes()
64 64
 	{
65 65
 		$service = $this->getServiceItem();
66
-		$attributes = $this->object->getServiceAttributes( 'delivery', $service->getId(), self::$basket );
66
+		$attributes = $this->object->getServiceAttributes('delivery', $service->getId(), self::$basket);
67 67
 
68
-		$this->assertEquals( 0, count( $attributes ) );
68
+		$this->assertEquals(0, count($attributes));
69 69
 	}
70 70
 
71 71
 
72 72
 	public function testGetServiceAttributesCache()
73 73
 	{
74
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
75
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
74
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
75
+		$basket = $orderManager->getSubManager('base')->createItem();
76 76
 
77
-		$services = $this->object->getServices( 'delivery', $basket );
77
+		$services = $this->object->getServices('delivery', $basket);
78 78
 
79
-		if( ( $service = reset( $services ) ) === false ) {
80
-			throw new \Exception( 'No service item found' );
79
+		if (($service = reset($services)) === false) {
80
+			throw new \Exception('No service item found');
81 81
 		}
82 82
 
83
-		$attributes = $this->object->getServiceAttributes( 'delivery', $service->getId(), self::$basket );
83
+		$attributes = $this->object->getServiceAttributes('delivery', $service->getId(), self::$basket);
84 84
 
85
-		$this->assertEquals( 0, count( $attributes ) );
85
+		$this->assertEquals(0, count($attributes));
86 86
 	}
87 87
 
88 88
 
89 89
 	public function testGetServiceAttributesNoItems()
90 90
 	{
91
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Service\\Exception' );
92
-		$this->object->getServiceAttributes( 'invalid', -1, self::$basket );
91
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Service\\Exception');
92
+		$this->object->getServiceAttributes('invalid', -1, self::$basket);
93 93
 	}
94 94
 
95 95
 
96 96
 	public function testGetServicePrice()
97 97
 	{
98
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
99
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
98
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
99
+		$basket = $orderManager->getSubManager('base')->createItem();
100 100
 
101 101
 		$service = $this->getServiceItem();
102
-		$price = $this->object->getServicePrice( 'delivery', $service->getId(), $basket );
102
+		$price = $this->object->getServicePrice('delivery', $service->getId(), $basket);
103 103
 
104
-		$this->assertEquals( '12.95', $price->getValue() );
105
-		$this->assertEquals( '1.99', $price->getCosts() );
104
+		$this->assertEquals('12.95', $price->getValue());
105
+		$this->assertEquals('1.99', $price->getCosts());
106 106
 	}
107 107
 
108 108
 
109 109
 	public function testGetServicePriceCache()
110 110
 	{
111
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
112
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
111
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
112
+		$basket = $orderManager->getSubManager('base')->createItem();
113 113
 
114
-		$services = $this->object->getServices( 'delivery', $basket );
114
+		$services = $this->object->getServices('delivery', $basket);
115 115
 
116
-		if( ( $service = reset( $services ) ) === false ) {
117
-			throw new \Exception( 'No service item found' );
116
+		if (($service = reset($services)) === false) {
117
+			throw new \Exception('No service item found');
118 118
 		}
119 119
 
120
-		$price = $this->object->getServicePrice( 'delivery', $service->getId(), $basket );
120
+		$price = $this->object->getServicePrice('delivery', $service->getId(), $basket);
121 121
 
122
-		$this->assertEquals( '12.95', $price->getValue() );
123
-		$this->assertEquals( '1.99', $price->getCosts() );
122
+		$this->assertEquals('12.95', $price->getValue());
123
+		$this->assertEquals('1.99', $price->getCosts());
124 124
 	}
125 125
 
126 126
 
127 127
 	public function testGetServicePriceNoItems()
128 128
 	{
129
-		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
130
-		$basket = $orderManager->getSubManager( 'base' )->createItem();
129
+		$orderManager = \Aimeos\MShop\Order\Manager\Factory::createManager(\TestHelperFrontend::getContext());
130
+		$basket = $orderManager->getSubManager('base')->createItem();
131 131
 
132
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Service\\Exception' );
133
-		$this->object->getServicePrice( 'invalid', -1, $basket );
132
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Service\\Exception');
133
+		$this->object->getServicePrice('invalid', -1, $basket);
134 134
 	}
135 135
 
136 136
 
137 137
 	public function testCheckServiceAttributes()
138 138
 	{
139 139
 		$service = $this->getServiceItem();
140
-		$attributes = $this->object->checkServiceAttributes( 'delivery', $service->getId(), array() );
140
+		$attributes = $this->object->checkServiceAttributes('delivery', $service->getId(), array());
141 141
 
142
-		$this->assertEquals( array(), $attributes );
142
+		$this->assertEquals(array(), $attributes);
143 143
 	}
144 144
 
145 145
 
@@ -148,21 +148,21 @@  discard block
 block discarded – undo
148 148
 	 */
149 149
 	protected function getServiceItem()
150 150
 	{
151
-		$serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
151
+		$serviceManager = \Aimeos\MShop\Service\Manager\Factory::createManager(\TestHelperFrontend::getContext());
152 152
 
153
-		$search = $serviceManager->createSearch( true );
153
+		$search = $serviceManager->createSearch(true);
154 154
 		$expr = array(
155 155
 			$search->getConditions(),
156
-			$search->compare( '==', 'service.provider', 'Standard' ),
157
-			$search->compare( '==', 'service.type.domain', 'service' ),
158
-			$search->compare( '==', 'service.type.code', 'delivery' ),
156
+			$search->compare('==', 'service.provider', 'Standard'),
157
+			$search->compare('==', 'service.type.domain', 'service'),
158
+			$search->compare('==', 'service.type.code', 'delivery'),
159 159
 		);
160
-		$search->setConditions( $search->combine( '&&', $expr ) );
160
+		$search->setConditions($search->combine('&&', $expr));
161 161
 
162
-		$services = $serviceManager->searchItems( $search );
162
+		$services = $serviceManager->searchItems($search);
163 163
 
164
-		if( ( $service = reset( $services ) ) === false ) {
165
-			throw new \Exception( 'No service item found' );
164
+		if (($service = reset($services)) === false) {
165
+			throw new \Exception('No service item found');
166 166
 		}
167 167
 
168 168
 		return $service;
Please login to merge, or discard this patch.
frontend/tests/Controller/Frontend/Service/Decorator/ExampleTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	protected function setUp()
23 23
 	{
24 24
 		$context = \TestHelperFrontend::getContext();
25
-		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController( $context, 'Standard' );
26
-		$this->object = new \Aimeos\Controller\Frontend\Service\Decorator\Example( $controller, $context );
25
+		$controller = \Aimeos\Controller\Frontend\Service\Factory::createController($context, 'Standard');
26
+		$this->object = new \Aimeos\Controller\Frontend\Service\Decorator\Example($controller, $context);
27 27
 	}
28 28
 
29 29
 
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 
42 42
 	public function testCall()
43 43
 	{
44
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Service\\Exception' );
45
-		$this->object->checkServiceAttributes( 'delivery', -1, array() );
44
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Service\\Exception');
45
+		$this->object->checkServiceAttributes('delivery', -1, array());
46 46
 	}
47 47
 
48 48
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Service/Factorylocal.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,20 +24,20 @@
 block discarded – undo
24 24
 	/**
25 25
 	 * @param string $name
26 26
 	 */
27
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null, $domainToTest = 'service' )
27
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null, $domainToTest = 'service')
28 28
 	{
29
-		if( $name === null ) {
30
-			$name = $context->getConfig()->get( 'controller/frontend/service/name', 'Standard' );
29
+		if ($name === null) {
30
+			$name = $context->getConfig()->get('controller/frontend/service/name', 'Standard');
31 31
 		}
32 32
 
33
-		if( ctype_alnum( $name ) === false ) {
34
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $name ) );
33
+		if (ctype_alnum($name) === false) {
34
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $name));
35 35
 		}
36 36
 
37 37
 		$iface = '\\Aimeos\\Controller\\Frontend\\Service\\Iface';
38 38
 		$classname = '\\Aimeos\\Controller\\Frontend\\Service\\' . $name;
39 39
 
40
-		$manager = self::createControllerBase( $context, $classname, $iface );
41
-		return self::addControllerDecorators( $context, $manager, $domainToTest );
40
+		$manager = self::createControllerBase($context, $classname, $iface);
41
+		return self::addControllerDecorators($context, $manager, $domainToTest);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/ExceptionTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 	protected function setUp()
17 17
 	{
18
-		$this->object = new \Aimeos\Controller\Frontend\Exception( 'msg', 1, null, array( 'key' => 'value' ) );
18
+		$this->object = new \Aimeos\Controller\Frontend\Exception('msg', 1, null, array('key' => 'value'));
19 19
 	}
20 20
 
21 21
 
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function testGetMessage()
28 28
 	{
29
-		$this->assertEquals( 'msg', $this->object->getMessage() );
29
+		$this->assertEquals('msg', $this->object->getMessage());
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testGetCode()
34 34
 	{
35
-		$this->assertEquals( 1, $this->object->getCode() );
35
+		$this->assertEquals(1, $this->object->getCode());
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testGetErrorList()
40 40
 	{
41
-		$this->assertEquals( array( 'key' => 'value' ), $this->object->getErrorList() );
41
+		$this->assertEquals(array('key' => 'value'), $this->object->getErrorList());
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Common/Factory/BaseTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@
 block discarded – undo
29 29
 		$this->context = \TestHelperFrontend::getContext();
30 30
 		$config = $this->context->getConfig();
31 31
 
32
-		$config->set( 'controller/frontend/common/decorators/default', array() );
33
-		$config->set( 'controller/frontend/admin/decorators/global', array() );
34
-		$config->set( 'controller/frontend/admin/decorators/local', array() );
32
+		$config->set('controller/frontend/common/decorators/default', array());
33
+		$config->set('controller/frontend/admin/decorators/global', array());
34
+		$config->set('controller/frontend/admin/decorators/local', array());
35 35
 
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testInjectController()
40 40
 	{
41
-		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController( $this->context, 'Standard' );
42
-		\Aimeos\Controller\Frontend\Catalog\Factory::injectController( '\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', $controller );
41
+		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController($this->context, 'Standard');
42
+		\Aimeos\Controller\Frontend\Catalog\Factory::injectController('\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', $controller);
43 43
 
44
-		$injectedController = \Aimeos\Controller\Frontend\Catalog\Factory::createController( $this->context, 'Standard' );
44
+		$injectedController = \Aimeos\Controller\Frontend\Catalog\Factory::createController($this->context, 'Standard');
45 45
 
46
-		$this->assertSame( $controller, $injectedController );
46
+		$this->assertSame($controller, $injectedController);
47 47
 	}
48 48
 
49 49
 
50 50
 	public function testInjectControllerReset()
51 51
 	{
52
-		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController( $this->context, 'Standard' );
53
-		\Aimeos\Controller\Frontend\Catalog\Factory::injectController( '\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', $controller );
54
-		\Aimeos\Controller\Frontend\Catalog\Factory::injectController( '\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', null );
52
+		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController($this->context, 'Standard');
53
+		\Aimeos\Controller\Frontend\Catalog\Factory::injectController('\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', $controller);
54
+		\Aimeos\Controller\Frontend\Catalog\Factory::injectController('\\Aimeos\\Controller\\Frontend\\Catalog\\Standard', null);
55 55
 
56
-		$new = \Aimeos\Controller\Frontend\Catalog\Factory::createController( $this->context, 'Standard' );
56
+		$new = \Aimeos\Controller\Frontend\Catalog\Factory::createController($this->context, 'Standard');
57 57
 
58
-		$this->assertNotSame( $controller, $new );
58
+		$this->assertNotSame($controller, $new);
59 59
 	}
60 60
 
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Basket/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
 	{
15 15
 		$target = '\\Aimeos\\Controller\\Frontend\\Basket\\Iface';
16 16
 
17
-		$controller = \Aimeos\Controller\Frontend\Basket\Factory::createController( \TestHelperFrontend::getContext() );
18
-		$this->assertInstanceOf( $target, $controller );
17
+		$controller = \Aimeos\Controller\Frontend\Basket\Factory::createController(\TestHelperFrontend::getContext());
18
+		$this->assertInstanceOf($target, $controller);
19 19
 
20
-		$controller = \Aimeos\Controller\Frontend\Basket\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
21
-		$this->assertInstanceOf( $target, $controller );
20
+		$controller = \Aimeos\Controller\Frontend\Basket\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
21
+		$this->assertInstanceOf($target, $controller);
22 22
 	}
23 23
 
24 24
 
25 25
 	public function testCreateControllerInvalidImplementation()
26 26
 	{
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
28
-		\Aimeos\Controller\Frontend\Basket\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
28
+		\Aimeos\Controller\Frontend\Basket\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCreateControllerInvalidName()
33 33
 	{
34
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
35
-		\Aimeos\Controller\Frontend\Basket\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
34
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
35
+		\Aimeos\Controller\Frontend\Basket\Factory::createController(\TestHelperFrontend::getContext(), '%^');
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testCreateControllerNotExisting()
40 40
 	{
41
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
42
-		\Aimeos\Controller\Frontend\Basket\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
41
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
42
+		\Aimeos\Controller\Frontend\Basket\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Catalog/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
 	{
15 15
 		$target = '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface';
16 16
 
17
-		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController( \TestHelperFrontend::getContext() );
18
-		$this->assertInstanceOf( $target, $controller );
17
+		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController(\TestHelperFrontend::getContext());
18
+		$this->assertInstanceOf($target, $controller);
19 19
 
20
-		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
21
-		$this->assertInstanceOf( $target, $controller );
20
+		$controller = \Aimeos\Controller\Frontend\Catalog\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
21
+		$this->assertInstanceOf($target, $controller);
22 22
 	}
23 23
 
24 24
 
25 25
 	public function testCreateControllerInvalidImplementation()
26 26
 	{
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
28
-		\Aimeos\Controller\Frontend\Catalog\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
28
+		\Aimeos\Controller\Frontend\Catalog\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCreateControllerInvalidName()
33 33
 	{
34
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
35
-		\Aimeos\Controller\Frontend\Catalog\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
34
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
35
+		\Aimeos\Controller\Frontend\Catalog\Factory::createController(\TestHelperFrontend::getContext(), '%^');
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testCreateControllerNotExisting()
40 40
 	{
41
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
42
-		\Aimeos\Controller\Frontend\Catalog\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
41
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
42
+		\Aimeos\Controller\Frontend\Catalog\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/Order/FactoryTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
 	{
15 15
 		$target = '\\Aimeos\\Controller\\Frontend\\Order\\Iface';
16 16
 
17
-		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext() );
18
-		$this->assertInstanceOf( $target, $controller );
17
+		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext());
18
+		$this->assertInstanceOf($target, $controller);
19 19
 
20
-		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'Standard' );
21
-		$this->assertInstanceOf( $target, $controller );
20
+		$controller = \Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'Standard');
21
+		$this->assertInstanceOf($target, $controller);
22 22
 	}
23 23
 
24 24
 
25 25
 	public function testCreateControllerInvalidImplementation()
26 26
 	{
27
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
28
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'Invalid' );
27
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
28
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'Invalid');
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCreateControllerInvalidName()
33 33
 	{
34
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
35
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), '%^' );
34
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
35
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), '%^');
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testCreateControllerNotExisting()
40 40
 	{
41
-		$this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' );
42
-		\Aimeos\Controller\Frontend\Order\Factory::createController( \TestHelperFrontend::getContext(), 'notexist' );
41
+		$this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception');
42
+		\Aimeos\Controller\Frontend\Order\Factory::createController(\TestHelperFrontend::getContext(), 'notexist');
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.