Passed
Push — 2019.01 ( adfca6...e67180 )
by Aimeos
02:17
created
lib/custom/tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 error_reporting( -1 );
13 13
 ini_set( 'display_errors', '1' );
14 14
 
15
-date_default_timezone_set('UTC');
15
+date_default_timezone_set( 'UTC' );
16 16
 
17 17
 
18 18
 /*
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Helper/Url/T3CliTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	public function testTransformAbsolute()
34 34
 	{
35 35
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
36
-			->setMethods( array( 'setCreateAbsoluteUri') )->getMock();
36
+			->setMethods( array( 'setCreateAbsoluteUri' ) )->getMock();
37 37
 
38 38
 		$mock->expects( $this->once() )->method( 'setCreateAbsoluteUri' )
39 39
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	public function testTransformChash()
48 48
 	{
49 49
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
50
-			->setMethods( array( 'setUseCacheHash') )->getMock();
50
+			->setMethods( array( 'setUseCacheHash' ) )->getMock();
51 51
 
52 52
 		$mock->expects( $this->once() )->method( 'setUseCacheHash' )
53 53
 			->with( $this->equalTo( false ) )->will( $this->returnValue( $mock ) );
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Helper/Url/Typo3Test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	public function testTransform()
34 34
 	{
35 35
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
36
-			->setMethods( array( 'buildFrontendUri') )->getMock();
36
+			->setMethods( array( 'buildFrontendUri' ) )->getMock();
37 37
 
38 38
 		$mock->expects( $this->once() )->method( 'buildFrontendUri' );
39 39
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	public function testTransformAbsolute()
48 48
 	{
49 49
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
50
-			->setMethods( array( 'setCreateAbsoluteUri') )->getMock();
50
+			->setMethods( array( 'setCreateAbsoluteUri' ) )->getMock();
51 51
 
52 52
 		$mock->expects( $this->once() )->method( 'setCreateAbsoluteUri' )
53 53
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	public function testTransformNocache()
63 63
 	{
64 64
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
65
-			->setMethods( array( 'setNoCache') )->getMock();
65
+			->setMethods( array( 'setNoCache' ) )->getMock();
66 66
 
67 67
 		$mock->expects( $this->once() )->method( 'setNoCache' )
68 68
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	public function testTransformChash()
78 78
 	{
79 79
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
80
-			->setMethods( array( 'setUseCacheHash') )->getMock();
80
+			->setMethods( array( 'setUseCacheHash' ) )->getMock();
81 81
 
82 82
 		$mock->expects( $this->once() )->method( 'setUseCacheHash' )
83 83
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	public function testTransformType()
93 93
 	{
94 94
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
95
-			->setMethods( array( 'setTargetPageType') )->getMock();
95
+			->setMethods( array( 'setTargetPageType' ) )->getMock();
96 96
 
97 97
 		$mock->expects( $this->once() )->method( 'setTargetPageType' )
98 98
 			->with( $this->equalTo( 123 ) )->will( $this->returnValue( $mock ) );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	public function testTransformFormat()
108 108
 	{
109 109
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
110
-			->setMethods( array( 'setFormat') )->getMock();
110
+			->setMethods( array( 'setFormat' ) )->getMock();
111 111
 
112 112
 		$mock->expects( $this->once() )->method( 'setFormat' )
113 113
 			->with( $this->equalTo( 'xml' ) )->will( $this->returnValue( $mock ) );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	public function testTransformEID()
123 123
 	{
124 124
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
125
-			->setMethods( array( 'setArguments') )->getMock();
125
+			->setMethods( array( 'setArguments' ) )->getMock();
126 126
 
127 127
 		$param = array( 'eID' => 123, 'ai' => array( 'controller' => null, 'action' => null ) );
128 128
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	public function testTransformBackend()
140 140
 	{
141 141
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
142
-		->setMethods( array( 'buildBackendUri') )->getMock();
142
+		->setMethods( array( 'buildBackendUri' ) )->getMock();
143 143
 
144 144
 		$mock->expects( $this->once() )->method( 'buildBackendUri' );
145 145
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	public function testTransformParams()
154 154
 	{
155 155
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
156
-			->setMethods( array( 'buildFrontendUri') )->getMock();
156
+			->setMethods( array( 'buildFrontendUri' ) )->getMock();
157 157
 
158 158
 		$mock->expects( $this->once() )->method( 'buildFrontendUri' );
159 159
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	public function testTransformUnchangedOriginalUriBuilder()
184 184
 	{
185 185
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
186
-			->setMethods( array( 'reset') )->getMock();
186
+			->setMethods( array( 'reset' ) )->getMock();
187 187
 
188 188
 		$mock->expects( $this->once() )->method( 'reset' )->will( $this->returnValue( $mock ) );
189 189
 
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Engine/Typo3Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 			->will( $this->returnValue( 'test' ) );
52 52
 
53 53
 		$this->mock->expects( $this->once() )->method( 'get' )
54
-			->will( $this->returnValue( $view) );
54
+			->will( $this->returnValue( $view ) );
55 55
 
56 56
 		$result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) );
57 57
 		$this->assertEquals( 'test', $result );
Please login to merge, or discard this patch.
lib/custom/tests/MW/Session/Typo3Test.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,31 +21,31 @@
 block discarded – undo
21 21
 	protected function setUp()
22 22
 	{
23 23
 		$mock = new \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication();
24
-		$this->object = new \Aimeos\MW\Session\Typo3($mock);
24
+		$this->object = new \Aimeos\MW\Session\Typo3( $mock );
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset($this->object);
30
+		unset( $this->object );
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testGet()
35 35
 	{
36
-		$this->assertEquals('', $this->object->get('test'));
36
+		$this->assertEquals( '', $this->object->get( 'test' ) );
37 37
 
38
-		$this->object->set('test', '123456789');
39
-		$this->assertEquals('123456789', $this->object->get('test'));
38
+		$this->object->set( 'test', '123456789' );
39
+		$this->assertEquals( '123456789', $this->object->get( 'test' ) );
40 40
 	}
41 41
 
42 42
 
43 43
 	public function testSet()
44 44
 	{
45
-		$this->object->set('test', '123');
45
+		$this->object->set( 'test', '123' );
46 46
 		$this->assertEquals( '123', $this->object->get( 'test' ) );
47 47
 
48
-		$this->object->set('test', '234');
48
+		$this->object->set( 'test', '234' );
49 49
 		$this->assertEquals( '234', $this->object->get( 'test' ) );
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Common/Criteria/Plugin/T3DateTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset($this->object);
35
+		unset( $this->object );
36 36
 	}
37 37
 
38 38
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/Typo3Test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	public function testGetItem()
43 43
 	{
44 44
 		$search = $this->object->createSearch();
45
-		$search->setSlice(0, 1);
46
-		$results = $this->object->searchItems($search);
45
+		$search->setSlice( 0, 1 );
46
+		$results = $this->object->searchItems( $search );
47 47
 
48
-		if( ( $expected = reset($results) ) === false ) {
48
+		if( ( $expected = reset( $results ) ) === false ) {
49 49
 			throw new \RuntimeException( 'No list type item found' );
50 50
 		}
51 51
 
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 	public function testSaveUpdateDeleteItem()
57 57
 	{
58 58
 		$search = $this->object->createSearch();
59
-		$search->setSlice(0, 1);
60
-		$results = $this->object->searchItems($search);
59
+		$search->setSlice( 0, 1 );
60
+		$results = $this->object->searchItems( $search );
61 61
 
62
-		if( ( $item = reset($results) ) === false ) {
62
+		if( ( $item = reset( $results ) ) === false ) {
63 63
 			throw new \RuntimeException( 'No type item found' );
64 64
 		}
65 65
 
66
-		$item->setId(null);
66
+		$item->setId( null );
67 67
 		$item->setCode( 'unitTestInit' );
68 68
 		$resultSaved = $this->object->saveItem( $item );
69 69
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
103 103
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
104 104
 
105
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
105
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
106 106
 		$this->object->getItem( $itemSaved->getId() );
107 107
 	}
108 108
 
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
 		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
126 126
 
127 127
 		$search->setConditions( $search->combine( '&&', $expr ) );
128
-		$search->setSlice(0, 1);
128
+		$search->setSlice( 0, 1 );
129 129
 
130 130
 		$results = $this->object->searchItems( $search, [], $total );
131 131
 		$this->assertEquals( 1, count( $results ) );
132 132
 		$this->assertEquals( 1, $total );
133 133
 
134
-		foreach($results as $itemId => $item) {
134
+		foreach( $results as $itemId => $item ) {
135 135
 			$this->assertEquals( $itemId, $item->getId() );
136 136
 		}
137 137
 	}
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Typo3Test.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	public function testGetItem()
54 54
 	{
55 55
 		$search = $this->object->createSearch();
56
-		$search->setSlice(0, 1);
56
+		$search->setSlice( 0, 1 );
57 57
 		$results = $this->object->searchItems( $search );
58 58
 
59 59
 		if( ( $item = reset( $results ) ) === false ) {
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
 	public function testSaveUpdateDeleteItem()
68 68
 	{
69 69
 		$search = $this->object->createSearch();
70
-		$search->setSlice(0, 1);
70
+		$search->setSlice( 0, 1 );
71 71
 		$items = $this->object->searchItems( $search );
72 72
 
73 73
 		if( ( $item = reset( $items ) ) === false ) {
74 74
 			throw new \RuntimeException( 'No item found' );
75 75
 		}
76 76
 
77
-		$item->setId(null);
77
+		$item->setId( null );
78 78
 		$item->setDomain( 'unittest' );
79 79
 		$resultSaved = $this->object->saveItem( $item );
80 80
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 		$this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() );
99 99
 		$this->assertEquals( $item->getPosition(), $itemSaved->getPosition() );
100 100
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
101
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated());
102
-		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified());
101
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeCreated() );
102
+		$this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeModified() );
103 103
 
104 104
 		$this->assertEquals( $this->editor, $itemSaved->getEditor() );
105 105
 		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() );
106
-		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
106
+		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() );
107 107
 
108 108
 		$this->assertEquals( $itemExp->getId(), $itemUpd->getId() );
109 109
 		$this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
123 123
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
124 124
 
125
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
125
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
126 126
 		$this->object->getItem( $itemSaved->getId() );
127 127
 	}
128 128
 
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
 		$expr[] = $search->compare( '==', 'customer.lists.editor', $this->editor );
240 240
 
241 241
 		$search->setConditions( $search->combine( '&&', $expr ) );
242
-		$search->setSlice(0, 1);
242
+		$search->setSlice( 0, 1 );
243 243
 		$results = $this->object->searchItems( $search, [], $total );
244 244
 		$this->assertEquals( 1, count( $results ) );
245 245
 		$this->assertEquals( 2, $total );
246 246
 
247
-		foreach($results as $itemId => $item) {
247
+		foreach( $results as $itemId => $item ) {
248 248
 			$this->assertEquals( $itemId, $item->getId() );
249 249
 		}
250 250
 	}
@@ -254,29 +254,29 @@  discard block
 block discarded – undo
254 254
 	{
255 255
 		$search = $this->object->createSearch();
256 256
 		$search->setConditions( $search->compare( '==', 'customer.lists.editor', $this->editor ) );
257
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
257
+		$this->assertEquals( 4, count( $this->object->searchItems( $search ) ) );
258 258
 	}
259 259
 
260 260
 
261 261
 	public function testSearchItemsBaseCriteria()
262 262
 	{
263
-		$search = $this->object->createSearch(true);
263
+		$search = $this->object->createSearch( true );
264 264
 		$conditions = array(
265 265
 			$search->compare( '==', 'customer.lists.editor', $this->editor ),
266 266
 			$search->getConditions()
267 267
 		);
268 268
 		$search->setConditions( $search->combine( '&&', $conditions ) );
269
-		$this->assertEquals( 4, count( $this->object->searchItems($search) ) );
269
+		$this->assertEquals( 4, count( $this->object->searchItems( $search ) ) );
270 270
 	}
271 271
 
272 272
 
273 273
 	public function testGetSubManager()
274 274
 	{
275
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
276
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Typo3') );
275
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) );
276
+		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Typo3' ) );
277 277
 
278
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
279
-		$this->object->getSubManager('unknown');
278
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
279
+		$this->object->getSubManager( 'unknown' );
280 280
 	}
281 281
 
282 282
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/Type/Typo3Test.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset($this->object);
30
+		unset( $this->object );
31 31
 	}
32 32
 
33 33
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 		$results = $this->object->searchItems( $search );
72 72
 
73
-		if( ($expected = reset($results) ) === false )
73
+		if( ( $expected = reset( $results ) ) === false )
74 74
 		{
75 75
 			throw new \RuntimeException( 'No property type item found.' );
76 76
 		}
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 	{
93 93
 		$search = $this->object->createSearch();
94 94
 		$search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) );
95
-		$results = $this->object->searchItems($search);
95
+		$results = $this->object->searchItems( $search );
96 96
 
97
-		if( ( $item = reset($results) ) === false ) {
97
+		if( ( $item = reset( $results ) ) === false ) {
98 98
 			throw new \RuntimeException( 'No type item found' );
99 99
 		}
100 100
 
101
-		$item->setId(null);
101
+		$item->setId( null );
102 102
 		$item->setCode( 'unitTestSave' );
103 103
 		$resultSaved = $this->object->saveItem( $item );
104 104
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -159,24 +159,24 @@  discard block
 block discarded – undo
159 159
 		$expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' );
160 160
 		$expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor );
161 161
 
162
-		$search->setConditions( $search->combine('&&', $expr) );
162
+		$search->setConditions( $search->combine( '&&', $expr ) );
163 163
 		$results = $this->object->searchItems( $search, [], $total );
164 164
 		$this->assertEquals( 1, count( $results ) );
165 165
 
166 166
 
167 167
 		$search = $this->object->createSearch();
168 168
 		$conditions = array(
169
-			$search->compare( '=~', 'customer.property.type.code', 'newsletter'),
169
+			$search->compare( '=~', 'customer.property.type.code', 'newsletter' ),
170 170
 			$search->compare( '==', 'customer.property.type.editor', $this->editor )
171 171
 		);
172
-		$search->setConditions( $search->combine('&&', $conditions ) );
173
-		$search->setSlice(0, 1);
174
-		$items = $this->object->searchItems( $search, [], $total);
172
+		$search->setConditions( $search->combine( '&&', $conditions ) );
173
+		$search->setSlice( 0, 1 );
174
+		$items = $this->object->searchItems( $search, [], $total );
175 175
 
176 176
 		$this->assertEquals( 1, count( $items ) );
177 177
 		$this->assertEquals( 1, $total );
178 178
 
179
-		foreach($items as $itemId => $item) {
179
+		foreach( $items as $itemId => $item ) {
180 180
 			$this->assertEquals( $itemId, $item->getId() );
181 181
 		}
182 182
 	}
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	public function testGetSubManager()
186 186
 	{
187
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
188
-		$this->object->getSubManager('unknown');
187
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
188
+		$this->object->getSubManager( 'unknown' );
189 189
 	}
190 190
 }
Please login to merge, or discard this patch.