@@ -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 | } |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | $this->execute( $stmt ); |
| 67 | 67 | } |
| 68 | 68 | $this->status( 'done' ); |
| 69 | - } |
|
| 70 | - else |
|
| 69 | + } else |
|
| 71 | 70 | { |
| 72 | 71 | $this->status( 'OK' ); |
| 73 | 72 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -192,10 +192,10 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | public function testGetSubManager() |
| 194 | 194 | { |
| 195 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') ); |
|
| 196 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Typo3') ); |
|
| 195 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) ); |
|
| 196 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Typo3' ) ); |
|
| 197 | 197 | |
| 198 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
| 199 | - $this->object->getSubManager('unknown'); |
|
| 198 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
| 199 | + $this->object->getSubManager( 'unknown' ); |
|
| 200 | 200 | } |
| 201 | 201 | } |
@@ -470,8 +470,7 @@ |
||
| 470 | 470 | */ |
| 471 | 471 | $path = 'mshop/customer/manager/typo3/insert'; |
| 472 | 472 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 473 | - } |
|
| 474 | - else |
|
| 473 | + } else |
|
| 475 | 474 | { |
| 476 | 475 | /** mshop/customer/manager/typo3/update |
| 477 | 476 | * Updates an existing customer record in the database |
@@ -237,8 +237,7 @@ |
||
| 237 | 237 | */ |
| 238 | 238 | $path = 'mshop/customer/manager/group/typo3/insert'; |
| 239 | 239 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 240 | - } |
|
| 241 | - else |
|
| 240 | + } else |
|
| 242 | 241 | { |
| 243 | 242 | /** mshop/customer/manager/group/typo3/update/mysql |
| 244 | 243 | * Updates an existing customer group record in the database |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | ->disableOriginalConstructor() |
| 32 | 32 | ->getMock(); |
| 33 | 33 | $configuration->expects( $this->once() )->method( 'getConfiguration' ); |
| 34 | - $this->mock->expects( $this->at(0) )->method( 'get' ) |
|
| 35 | - ->will( $this->returnValue( $configuration) ); |
|
| 34 | + $this->mock->expects( $this->at( 0 ) )->method( 'get' ) |
|
| 35 | + ->will( $this->returnValue( $configuration ) ); |
|
| 36 | 36 | |
| 37 | 37 | $this->object = new \Aimeos\MW\View\Engine\Typo3( $this->mock ); |
| 38 | 38 | } |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | $view->expects( $this->once() )->method( 'render' ) |
| 62 | 62 | ->will( $this->returnValue( 'test' ) ); |
| 63 | 63 | |
| 64 | - $this->mock->expects( $this->at(0) )->method( 'get' ) |
|
| 65 | - ->will( $this->returnValue( $view) ); |
|
| 64 | + $this->mock->expects( $this->at( 0 ) )->method( 'get' ) |
|
| 65 | + ->will( $this->returnValue( $view ) ); |
|
| 66 | 66 | |
| 67 | 67 | $result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) ); |
| 68 | 68 | $this->assertEquals( 'test', $result ); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function __construct( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager ) |
| 33 | 33 | { |
| 34 | 34 | $this->objectManager = $objectManager; |
| 35 | - $this->configuration = $this->objectManager->get(ConfigurationManager::class)->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK); |
|
| 35 | + $this->configuration = $this->objectManager->get( ConfigurationManager::class )->getConfiguration( ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | public function render( \Aimeos\MW\View\Iface $view, string $filename, array $values ) : string |
| 49 | 49 | { |
| 50 | 50 | $fluid = $this->objectManager->get( 'TYPO3\\CMS\\Fluid\\View\\StandaloneView' ); |
| 51 | - $fluid->setPartialRootPaths((array) $this->configuration['view']['partialRootPaths']); |
|
| 52 | - $fluid->setLayoutRootPaths((array) $this->configuration['view']['layoutRootPaths']); |
|
| 51 | + $fluid->setPartialRootPaths( (array) $this->configuration['view']['partialRootPaths'] ); |
|
| 52 | + $fluid->setLayoutRootPaths( (array) $this->configuration['view']['layoutRootPaths'] ); |
|
| 53 | 53 | $fluid->setTemplatePathAndFilename( $filename ); |
| 54 | 54 | $fluid->assign( '_aimeos_view', $view ); |
| 55 | 55 | $fluid->assignMultiple( $values ); |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | ) { |
| 59 | 59 | $this->execute( $sql, 'db-customer' ); |
| 60 | 60 | $this->status( 'done' ); |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $this->status( 'OK' ); |
| 65 | 64 | } |