@@ -12,7 +12,7 @@ |
||
| 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 | /* |
@@ -33,7 +33,7 @@ discard block |
||
| 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 |
||
| 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 ) ); |
@@ -21,31 +21,31 @@ |
||
| 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 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | protected function tearDown() |
| 34 | 34 | { |
| 35 | - unset($this->object); |
|
| 35 | + unset( $this->object ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | $search->setConditions( $search->compare( '==', 'customer.property.editor', $this->editor ) ); |
| 58 | 58 | $results = $this->object->searchItems( $search ); |
| 59 | 59 | |
| 60 | - if( ( $item = reset($results) ) === false ) { |
|
| 60 | + if( ( $item = reset( $results ) ) === false ) { |
|
| 61 | 61 | throw new \RuntimeException( 'No property item found' ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - $item->setId(null); |
|
| 64 | + $item->setId( null ); |
|
| 65 | 65 | $item->setLanguageId( 'en' ); |
| 66 | 66 | $resultSaved = $this->object->saveItem( $item ); |
| 67 | 67 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -110,13 +110,13 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $search = $this->object->createSearch(); |
| 112 | 112 | $conditions = array( |
| 113 | - $search->compare( '~=', 'customer.property.value', '1'), |
|
| 113 | + $search->compare( '~=', 'customer.property.value', '1' ), |
|
| 114 | 114 | $search->compare( '==', 'customer.property.editor', $this->editor ) |
| 115 | 115 | ); |
| 116 | 116 | $search->setConditions( $search->combine( '&&', $conditions ) ); |
| 117 | 117 | $results = $this->object->searchItems( $search ); |
| 118 | 118 | |
| 119 | - if( ($expected = reset($results)) === false ) { |
|
| 119 | + if( ( $expected = reset( $results ) ) === false ) { |
|
| 120 | 120 | throw new \RuntimeException( sprintf( 'No customer property item found for value "%1$s".', '1' ) ); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $expr[] = $search->compare( '==', 'customer.property.value', '1' ); |
| 156 | 156 | $expr[] = $search->compare( '==', 'customer.property.editor', $this->editor ); |
| 157 | 157 | |
| 158 | - $search->setConditions( $search->combine('&&', $expr) ); |
|
| 158 | + $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 159 | 159 | $results = $this->object->searchItems( $search, [], $total ); |
| 160 | 160 | $this->assertEquals( 1, count( $results ) ); |
| 161 | 161 | } |
@@ -163,17 +163,17 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | public function testGetSubManager() |
| 165 | 165 | { |
| 166 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') ); |
|
| 167 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') ); |
|
| 166 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) ); |
|
| 167 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Standard' ) ); |
|
| 168 | 168 | |
| 169 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
| 170 | - $this->object->getSubManager('unknown'); |
|
| 169 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
| 170 | + $this->object->getSubManager( 'unknown' ); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | public function testGetSubManagerInvalidName() |
| 175 | 175 | { |
| 176 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
| 177 | - $this->object->getSubManager('type', 'unknown'); |
|
| 176 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
| 177 | + $this->object->getSubManager( 'type', 'unknown' ); |
|
| 178 | 178 | } |
| 179 | 179 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $server = ServerRequestFactory::normalizeServer( $server ); |
| 96 | 96 | $headers = ServerRequestFactory::marshalHeaders( $server ); |
| 97 | 97 | $uri = ServerRequestFactory::marshalUriFromServer( $server, $headers ); |
| 98 | - $method = ServerRequestFactory::get('REQUEST_METHOD', $server, 'GET'); |
|
| 98 | + $method = ServerRequestFactory::get( 'REQUEST_METHOD', $server, 'GET' ); |
|
| 99 | 99 | |
| 100 | 100 | return new ServerRequest( $server, $files, $uri, $method, 'php://input', $headers, $cookies, $query, $post ); |
| 101 | 101 | } |
@@ -42,8 +42,8 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function migrate() |
| 44 | 44 | { |
| 45 | - $this->msg('Setting up Aimeos TYPO3 test tables', 0); |
|
| 46 | - $this->status(''); |
|
| 45 | + $this->msg( 'Setting up Aimeos TYPO3 test tables', 0 ); |
|
| 46 | + $this->status( '' ); |
|
| 47 | 47 | |
| 48 | 48 | $filename = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'mysql.sql'; |
| 49 | 49 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | protected function tearDown() |
| 34 | 34 | { |
| 35 | - unset($this->object); |
|
| 35 | + unset( $this->object ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | protected function tearDown() |
| 34 | 34 | { |
| 35 | - unset($this->object); |
|
| 35 | + unset( $this->object ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |