@@ -14,31 +14,31 @@ discard block |
||
14 | 14 | { |
15 | 15 | \Aimeos\Aimeos\Base::aimeos(); // initialize autoloader |
16 | 16 | |
17 | - $this->object = $this->getAccessibleMock('Aimeos\\Aimeos\\Controller\\BasketController', array('dummy')); |
|
17 | + $this->object = $this->getAccessibleMock( 'Aimeos\\Aimeos\\Controller\\BasketController', array( 'dummy' ) ); |
|
18 | 18 | |
19 | 19 | $objManager = new \TYPO3\CMS\Extbase\Object\ObjectManager(); |
20 | 20 | |
21 | - $uriBuilder = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder'); |
|
22 | - $response = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response'); |
|
23 | - $request = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request'); |
|
21 | + $uriBuilder = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' ); |
|
22 | + $response = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response' ); |
|
23 | + $request = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request' ); |
|
24 | 24 | |
25 | - $uriBuilder->setRequest($request); |
|
25 | + $uriBuilder->setRequest( $request ); |
|
26 | 26 | |
27 | - if (method_exists($response, 'setRequest')) { |
|
28 | - $response->setRequest($request); |
|
27 | + if( method_exists( $response, 'setRequest' ) ) { |
|
28 | + $response->setRequest( $request ); |
|
29 | 29 | } |
30 | 30 | |
31 | - $this->object->_set('uriBuilder', $uriBuilder); |
|
32 | - $this->object->_set('response', $response); |
|
33 | - $this->object->_set('request', $request); |
|
31 | + $this->object->_set( 'uriBuilder', $uriBuilder ); |
|
32 | + $this->object->_set( 'response', $response ); |
|
33 | + $this->object->_set( 'request', $request ); |
|
34 | 34 | |
35 | - $this->object->_call('initializeAction'); |
|
35 | + $this->object->_call( 'initializeAction' ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function tearDown() |
40 | 40 | { |
41 | - unset($this->object); |
|
41 | + unset( $this->object ); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
@@ -48,16 +48,16 @@ discard block |
||
48 | 48 | public function indexAction() |
49 | 49 | { |
50 | 50 | $name = '\\Aimeos\\Client\\Html\\Basket\\Standard\\Standard'; |
51 | - $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), [], '', false); |
|
51 | + $client = $this->getMock( $name, array( 'getBody', 'getHeader', 'process' ), [], '', false ); |
|
52 | 52 | |
53 | - $client->expects($this->once())->method('getBody')->will($this->returnValue('body')); |
|
54 | - $client->expects($this->once())->method('getHeader')->will($this->returnValue('header')); |
|
53 | + $client->expects( $this->once() )->method( 'getBody' )->will( $this->returnValue( 'body' ) ); |
|
54 | + $client->expects( $this->once() )->method( 'getHeader' )->will( $this->returnValue( 'header' ) ); |
|
55 | 55 | |
56 | - \Aimeos\Client\Html\Basket\Standard\Factory::injectClient($name, $client); |
|
56 | + \Aimeos\Client\Html\Basket\Standard\Factory::injectClient( $name, $client ); |
|
57 | 57 | $output = $this->object->indexAction(); |
58 | - \Aimeos\Client\Html\Basket\Standard\Factory::injectClient($name, null); |
|
58 | + \Aimeos\Client\Html\Basket\Standard\Factory::injectClient( $name, null ); |
|
59 | 59 | |
60 | - $this->assertEquals('body', $output); |
|
60 | + $this->assertEquals( 'body', $output ); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
@@ -67,15 +67,15 @@ discard block |
||
67 | 67 | public function smallAction() |
68 | 68 | { |
69 | 69 | $name = '\\Aimeos\\Client\\Html\\Basket\\Mini\\Standard'; |
70 | - $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), [], '', false); |
|
70 | + $client = $this->getMock( $name, array( 'getBody', 'getHeader', 'process' ), [], '', false ); |
|
71 | 71 | |
72 | - $client->expects($this->once())->method('getBody')->will($this->returnValue('body')); |
|
73 | - $client->expects($this->once())->method('getHeader')->will($this->returnValue('header')); |
|
72 | + $client->expects( $this->once() )->method( 'getBody' )->will( $this->returnValue( 'body' ) ); |
|
73 | + $client->expects( $this->once() )->method( 'getHeader' )->will( $this->returnValue( 'header' ) ); |
|
74 | 74 | |
75 | - \Aimeos\Client\Html\Basket\Mini\Factory::injectClient($name, $client); |
|
75 | + \Aimeos\Client\Html\Basket\Mini\Factory::injectClient( $name, $client ); |
|
76 | 76 | $output = $this->object->smallAction(); |
77 | - \Aimeos\Client\Html\Basket\Mini\Factory::injectClient($name, null); |
|
77 | + \Aimeos\Client\Html\Basket\Mini\Factory::injectClient( $name, null ); |
|
78 | 78 | |
79 | - $this->assertEquals('body', $output); |
|
79 | + $this->assertEquals( 'body', $output ); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | \ No newline at end of file |
@@ -14,31 +14,31 @@ discard block |
||
14 | 14 | { |
15 | 15 | \Aimeos\Aimeos\Base::aimeos(); // initialize autoloader |
16 | 16 | |
17 | - $this->object = $this->getAccessibleMock('Aimeos\\Aimeos\\Controller\\LocaleController', array('dummy')); |
|
17 | + $this->object = $this->getAccessibleMock( 'Aimeos\\Aimeos\\Controller\\LocaleController', array( 'dummy' ) ); |
|
18 | 18 | |
19 | 19 | $objManager = new \TYPO3\CMS\Extbase\Object\ObjectManager(); |
20 | 20 | |
21 | - $uriBuilder = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder'); |
|
22 | - $response = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response'); |
|
23 | - $request = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request'); |
|
21 | + $uriBuilder = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' ); |
|
22 | + $response = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response' ); |
|
23 | + $request = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request' ); |
|
24 | 24 | |
25 | - $uriBuilder->setRequest($request); |
|
25 | + $uriBuilder->setRequest( $request ); |
|
26 | 26 | |
27 | - if (method_exists($response, 'setRequest')) { |
|
28 | - $response->setRequest($request); |
|
27 | + if( method_exists( $response, 'setRequest' ) ) { |
|
28 | + $response->setRequest( $request ); |
|
29 | 29 | } |
30 | 30 | |
31 | - $this->object->_set('uriBuilder', $uriBuilder); |
|
32 | - $this->object->_set('response', $response); |
|
33 | - $this->object->_set('request', $request); |
|
31 | + $this->object->_set( 'uriBuilder', $uriBuilder ); |
|
32 | + $this->object->_set( 'response', $response ); |
|
33 | + $this->object->_set( 'request', $request ); |
|
34 | 34 | |
35 | - $this->object->_call('initializeAction'); |
|
35 | + $this->object->_call( 'initializeAction' ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function tearDown() |
40 | 40 | { |
41 | - unset($this->object); |
|
41 | + unset( $this->object ); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
@@ -48,15 +48,15 @@ discard block |
||
48 | 48 | public function selectAction() |
49 | 49 | { |
50 | 50 | $name = '\\Aimeos\\Client\\Html\\Locale\\Select\\Standard'; |
51 | - $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), [], '', false); |
|
51 | + $client = $this->getMock( $name, array( 'getBody', 'getHeader', 'process' ), [], '', false ); |
|
52 | 52 | |
53 | - $client->expects($this->once())->method('getBody')->will($this->returnValue('body')); |
|
54 | - $client->expects($this->once())->method('getHeader')->will($this->returnValue('header')); |
|
53 | + $client->expects( $this->once() )->method( 'getBody' )->will( $this->returnValue( 'body' ) ); |
|
54 | + $client->expects( $this->once() )->method( 'getHeader' )->will( $this->returnValue( 'header' ) ); |
|
55 | 55 | |
56 | - \Aimeos\Client\Html\Locale\Select\Factory::injectClient($name, $client); |
|
56 | + \Aimeos\Client\Html\Locale\Select\Factory::injectClient( $name, $client ); |
|
57 | 57 | $output = $this->object->selectAction(); |
58 | - \Aimeos\Client\Html\Locale\Select\Factory::injectClient($name, null); |
|
58 | + \Aimeos\Client\Html\Locale\Select\Factory::injectClient( $name, null ); |
|
59 | 59 | |
60 | - $this->assertEquals('body', $output); |
|
60 | + $this->assertEquals( 'body', $output ); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | \ No newline at end of file |
@@ -17,38 +17,38 @@ discard block |
||
17 | 17 | { |
18 | 18 | \Aimeos\Aimeos\Base::aimeos(); // initialize autoloader |
19 | 19 | |
20 | - $this->object = $this->getAccessibleMock('Aimeos\\Aimeos\\Controller\\JsonapiController', array('dummy')); |
|
20 | + $this->object = $this->getAccessibleMock( 'Aimeos\\Aimeos\\Controller\\JsonapiController', array( 'dummy' ) ); |
|
21 | 21 | |
22 | - $this->request = $this->getMockBuilder('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request') |
|
23 | - ->setMethods(array('hasArgument', 'getArgument', 'getMethod')) |
|
22 | + $this->request = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request' ) |
|
23 | + ->setMethods( array( 'hasArgument', 'getArgument', 'getMethod' ) ) |
|
24 | 24 | ->disableOriginalConstructor() |
25 | 25 | ->getMock(); |
26 | 26 | |
27 | - $this->response = $this->getMockBuilder('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response') |
|
28 | - ->setMethods(array('setStatus')) |
|
27 | + $this->response = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response' ) |
|
28 | + ->setMethods( array( 'setStatus' ) ) |
|
29 | 29 | ->disableOriginalConstructor() |
30 | 30 | ->getMock(); |
31 | 31 | |
32 | - $this->uriBuilder = $this->getMockBuilder('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder') |
|
33 | - ->setMethods(array('buildFrontendUri')) |
|
32 | + $this->uriBuilder = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' ) |
|
33 | + ->setMethods( array( 'buildFrontendUri' ) ) |
|
34 | 34 | ->disableOriginalConstructor() |
35 | 35 | ->getMock(); |
36 | 36 | |
37 | - if (method_exists($response, 'setRequest')) { |
|
38 | - $response->setRequest($this->request); |
|
37 | + if( method_exists( $response, 'setRequest' ) ) { |
|
38 | + $response->setRequest( $this->request ); |
|
39 | 39 | } |
40 | 40 | |
41 | - $this->object->_set('uriBuilder', $this->uriBuilder); |
|
42 | - $this->object->_set('response', $this->response); |
|
43 | - $this->object->_set('request', $this->request); |
|
41 | + $this->object->_set( 'uriBuilder', $this->uriBuilder ); |
|
42 | + $this->object->_set( 'response', $this->response ); |
|
43 | + $this->object->_set( 'request', $this->request ); |
|
44 | 44 | |
45 | - $this->object->_call('initializeAction'); |
|
45 | + $this->object->_call( 'initializeAction' ); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
49 | 49 | public function tearDown() |
50 | 50 | { |
51 | - unset($this->object, $this->request, $this->response); |
|
51 | + unset( $this->object, $this->request, $this->response ); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
@@ -57,26 +57,26 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function optionsAction() |
59 | 59 | { |
60 | - $this->request->expects($this->exactly(1))->method('getMethod') |
|
61 | - ->will($this->returnValue('OPTIONS')); |
|
60 | + $this->request->expects( $this->exactly( 1 ) )->method( 'getMethod' ) |
|
61 | + ->will( $this->returnValue( 'OPTIONS' ) ); |
|
62 | 62 | |
63 | - $this->request->expects($this->atLeastOnce())->method('hasArgument') |
|
64 | - ->will($this->returnValue(true)); |
|
63 | + $this->request->expects( $this->atLeastOnce() )->method( 'hasArgument' ) |
|
64 | + ->will( $this->returnValue( true ) ); |
|
65 | 65 | |
66 | - $this->request->expects($this->any())->method('getArgument') |
|
67 | - ->will($this->onConsecutiveCalls('', 'unittest', null, null, 'unittest', null, null)); |
|
66 | + $this->request->expects( $this->any() )->method( 'getArgument' ) |
|
67 | + ->will( $this->onConsecutiveCalls( '', 'unittest', null, null, 'unittest', null, null ) ); |
|
68 | 68 | |
69 | - $this->response->expects($this->exactly(1))->method('setStatus') |
|
70 | - ->with($this->equalTo(200)); |
|
69 | + $this->response->expects( $this->exactly( 1 ) )->method( 'setStatus' ) |
|
70 | + ->with( $this->equalTo( 200 ) ); |
|
71 | 71 | |
72 | 72 | $result = $this->object->indexAction(); |
73 | - $json = json_decode($result, true); |
|
73 | + $json = json_decode( $result, true ); |
|
74 | 74 | |
75 | - $this->assertNotEquals(null, $json); |
|
76 | - $this->assertArrayHasKey('meta', $json); |
|
77 | - $this->assertArrayHasKey('resources', $json['meta']); |
|
78 | - $this->assertGreaterThan(1, count($json['meta']['resources'])); |
|
79 | - $this->assertArrayHasKey('product', $json['meta']['resources']); |
|
75 | + $this->assertNotEquals( null, $json ); |
|
76 | + $this->assertArrayHasKey( 'meta', $json ); |
|
77 | + $this->assertArrayHasKey( 'resources', $json['meta'] ); |
|
78 | + $this->assertGreaterThan( 1, count( $json['meta']['resources'] ) ); |
|
79 | + $this->assertArrayHasKey( 'product', $json['meta']['resources'] ); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | |
@@ -85,25 +85,25 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function getAction() |
87 | 87 | { |
88 | - $this->request->expects($this->exactly(1))->method('getMethod') |
|
89 | - ->will($this->returnValue('GET')); |
|
88 | + $this->request->expects( $this->exactly( 1 ) )->method( 'getMethod' ) |
|
89 | + ->will( $this->returnValue( 'GET' ) ); |
|
90 | 90 | |
91 | - $this->request->expects($this->atLeastOnce())->method('hasArgument') |
|
92 | - ->will($this->returnValue(true)); |
|
91 | + $this->request->expects( $this->atLeastOnce() )->method( 'hasArgument' ) |
|
92 | + ->will( $this->returnValue( true ) ); |
|
93 | 93 | |
94 | - $this->request->expects($this->any())->method('getArgument') |
|
95 | - ->will($this->onConsecutiveCalls('product', 'unittest', null, null, 'unittest', null, null)); |
|
94 | + $this->request->expects( $this->any() )->method( 'getArgument' ) |
|
95 | + ->will( $this->onConsecutiveCalls( 'product', 'unittest', null, null, 'unittest', null, null ) ); |
|
96 | 96 | |
97 | - $this->response->expects($this->exactly(1))->method('setStatus') |
|
98 | - ->with($this->equalTo(200)); |
|
97 | + $this->response->expects( $this->exactly( 1 ) )->method( 'setStatus' ) |
|
98 | + ->with( $this->equalTo( 200 ) ); |
|
99 | 99 | |
100 | - $this->uriBuilder->expects($this->any())->method('buildFrontendUri') |
|
101 | - ->will($this->returnValue('http://localhost/')); |
|
100 | + $this->uriBuilder->expects( $this->any() )->method( 'buildFrontendUri' ) |
|
101 | + ->will( $this->returnValue( 'http://localhost/' ) ); |
|
102 | 102 | |
103 | 103 | $result = $this->object->indexAction(); |
104 | - $json = json_decode($result, true); |
|
104 | + $json = json_decode( $result, true ); |
|
105 | 105 | |
106 | - $this->assertNotEquals(null, $json); |
|
106 | + $this->assertNotEquals( null, $json ); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | } |
110 | 110 | \ No newline at end of file |
@@ -14,31 +14,31 @@ discard block |
||
14 | 14 | { |
15 | 15 | \Aimeos\Aimeos\Base::aimeos(); // initialize autoloader |
16 | 16 | |
17 | - $this->object = $this->getAccessibleMock('Aimeos\\Aimeos\\Controller\\AccountController', array('dummy')); |
|
17 | + $this->object = $this->getAccessibleMock( 'Aimeos\\Aimeos\\Controller\\AccountController', array( 'dummy' ) ); |
|
18 | 18 | |
19 | 19 | $objManager = new \TYPO3\CMS\Extbase\Object\ObjectManager(); |
20 | 20 | |
21 | - $uriBuilder = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder'); |
|
22 | - $response = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response'); |
|
23 | - $request = $objManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request'); |
|
21 | + $uriBuilder = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' ); |
|
22 | + $response = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response' ); |
|
23 | + $request = $objManager->get( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request' ); |
|
24 | 24 | |
25 | - $uriBuilder->setRequest($request); |
|
25 | + $uriBuilder->setRequest( $request ); |
|
26 | 26 | |
27 | - if (method_exists($response, 'setRequest')) { |
|
28 | - $response->setRequest($request); |
|
27 | + if( method_exists( $response, 'setRequest' ) ) { |
|
28 | + $response->setRequest( $request ); |
|
29 | 29 | } |
30 | 30 | |
31 | - $this->object->_set('uriBuilder', $uriBuilder); |
|
32 | - $this->object->_set('response', $response); |
|
33 | - $this->object->_set('request', $request); |
|
31 | + $this->object->_set( 'uriBuilder', $uriBuilder ); |
|
32 | + $this->object->_set( 'response', $response ); |
|
33 | + $this->object->_set( 'request', $request ); |
|
34 | 34 | |
35 | - $this->object->_call('initializeAction'); |
|
35 | + $this->object->_call( 'initializeAction' ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function tearDown() |
40 | 40 | { |
41 | - unset($this->object); |
|
41 | + unset( $this->object ); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
@@ -48,13 +48,13 @@ discard block |
||
48 | 48 | public function downloadAction() |
49 | 49 | { |
50 | 50 | $name = '\\Aimeos\\Client\\Html\\Account\\Download\\Standard'; |
51 | - $client = $this->getMock($name, array('process'), [], '', false); |
|
51 | + $client = $this->getMock( $name, array( 'process' ), [], '', false ); |
|
52 | 52 | |
53 | - \Aimeos\Client\Html\Account\Download\Factory::injectClient($name, $client); |
|
53 | + \Aimeos\Client\Html\Account\Download\Factory::injectClient( $name, $client ); |
|
54 | 54 | $output = $this->object->downloadAction(); |
55 | - \Aimeos\Client\Html\Account\Download\Factory::injectClient($name, null); |
|
55 | + \Aimeos\Client\Html\Account\Download\Factory::injectClient( $name, null ); |
|
56 | 56 | |
57 | - $this->assertEquals('', $output); |
|
57 | + $this->assertEquals( '', $output ); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | |
@@ -64,15 +64,15 @@ discard block |
||
64 | 64 | public function historyAction() |
65 | 65 | { |
66 | 66 | $name = '\\Aimeos\\Client\\Html\\Account\\History\\Standard'; |
67 | - $client = $this->getMock($name, array('getBody', 'getHeader', 'process'), [], '', false); |
|
67 | + $client = $this->getMock( $name, array( 'getBody', 'getHeader', 'process' ), [], '', false ); |
|
68 | 68 | |
69 | - $client->expects($this->once())->method('getBody')->will($this->returnValue('body')); |
|
70 | - $client->expects($this->once())->method('getHeader')->will($this->returnValue('header')); |
|
69 | + $client->expects( $this->once() )->method( 'getBody' )->will( $this->returnValue( 'body' ) ); |
|
70 | + $client->expects( $this->once() )->method( 'getHeader' )->will( $this->returnValue( 'header' ) ); |
|
71 | 71 | |
72 | - \Aimeos\Client\Html\Account\History\Factory::injectClient($name, $client); |
|
72 | + \Aimeos\Client\Html\Account\History\Factory::injectClient( $name, $client ); |
|
73 | 73 | $output = $this->object->historyAction(); |
74 | - \Aimeos\Client\Html\Account\History\Factory::injectClient($name, null); |
|
74 | + \Aimeos\Client\Html\Account\History\Factory::injectClient( $name, null ); |
|
75 | 75 | |
76 | - $this->assertEquals('body', $output); |
|
76 | + $this->assertEquals( 'body', $output ); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | \ No newline at end of file |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | namespace Aimeos\Aimeos\Tests\Unit; |
5 | 5 | |
6 | 6 | |
7 | -require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'class.ext_update.php'; |
|
7 | +require_once dirname( dirname( __DIR__ ) ) . DIRECTORY_SEPARATOR . 'class.ext_update.php'; |
|
8 | 8 | |
9 | 9 | |
10 | 10 | class UpdateTest |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | public function tearDown() |
23 | 23 | { |
24 | - unset($this->object); |
|
24 | + unset( $this->object ); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function access() |
32 | 32 | { |
33 | - $this->assertTrue($this->object->access()); |
|
33 | + $this->assertTrue( $this->object->access() ); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | |
@@ -41,6 +41,6 @@ discard block |
||
41 | 41 | { |
42 | 42 | $result = $this->object->main(); |
43 | 43 | |
44 | - $this->assertContains('Setup process lasted', $result); |
|
44 | + $this->assertContains( 'Setup process lasted', $result ); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | * ['cshKey'] => The CSH key for the field |
35 | 35 | * ['cshLabel'] => The code of the CSH label |
36 | 36 | */ |
37 | - public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
|
37 | + public function getAdditionalFields( array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject ) |
|
38 | 38 | { |
39 | 39 | try { |
40 | - return $this->getFields($taskInfo, $task, $parentObject); |
|
41 | - } catch(\Exception $e) { |
|
42 | - $this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
|
40 | + return $this->getFields( $taskInfo, $task, $parentObject ); |
|
41 | + } catch( \Exception $e ) { |
|
42 | + $this->addMessage( $e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR ); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return []; |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | * @param array $submittedData Array containing the data submitted by the user |
55 | 55 | * @param tx_scheduler_Task $task Reference to the current task object |
56 | 56 | */ |
57 | - public function saveAdditionalFields(array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task) |
|
57 | + public function saveAdditionalFields( array $submittedData, \TYPO3\CMS\Scheduler\Task\AbstractTask $task ) |
|
58 | 58 | { |
59 | - $this->saveFields($submittedData, $task); |
|
59 | + $this->saveFields( $submittedData, $task ); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | * @param tx_scheduler_Module $parentObject Reference to the calling object (Scheduler's BE module) |
70 | 70 | * @return boolean True if validation was ok (or selected class is not relevant), false otherwise |
71 | 71 | */ |
72 | - public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
|
72 | + public function validateAdditionalFields( array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject ) |
|
73 | 73 | { |
74 | 74 | try { |
75 | - return $this->validateFields($submittedData, $parentObject); |
|
76 | - } catch(\Exception $e) { |
|
77 | - $this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
|
75 | + return $this->validateFields( $submittedData, $parentObject ); |
|
76 | + } catch( \Exception $e ) { |
|
77 | + $this->addMessage( $e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR ); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | return false; |
@@ -36,9 +36,12 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getAdditionalFields(array &$taskInfo, $task, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
38 | 38 | { |
39 | - try { |
|
39 | + try |
|
40 | + { |
|
40 | 41 | return $this->getFields($taskInfo, $task, $parentObject); |
41 | - } catch(\Exception $e) { |
|
42 | + } |
|
43 | + catch(\Exception $e) |
|
44 | + { |
|
42 | 45 | $this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
43 | 46 | } |
44 | 47 | |
@@ -71,9 +74,12 @@ discard block |
||
71 | 74 | */ |
72 | 75 | public function validateAdditionalFields(array &$submittedData, \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $parentObject) |
73 | 76 | { |
74 | - try { |
|
77 | + try |
|
78 | + { |
|
75 | 79 | return $this->validateFields($submittedData, $parentObject); |
76 | - } catch(\Exception $e) { |
|
80 | + } |
|
81 | + catch(\Exception $e) |
|
82 | + { |
|
77 | 83 | $this->addMessage($e->getMessage(), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
78 | 84 | } |
79 | 85 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function tearDown() |
20 | 20 | { |
21 | - unset($this->object); |
|
21 | + unset( $this->object ); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
@@ -29,6 +29,6 @@ discard block |
||
29 | 29 | { |
30 | 30 | $result = $this->object->execute(); |
31 | 31 | |
32 | - $this->assertTrue($result); |
|
32 | + $this->assertTrue( $result ); |
|
33 | 33 | } |
34 | 34 | } |
@@ -1,89 +1,89 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return array( |
4 | - 'jqadm' => array( |
|
5 | - 'url' => array( |
|
6 | - 'batch' => array( |
|
7 | - 'controller' => 'Jqadm', |
|
8 | - 'action' => 'batch', |
|
9 | - 'config' => array( |
|
10 | - 'BE' => true, |
|
11 | - ), |
|
12 | - ), |
|
13 | - 'copy' => array( |
|
14 | - 'controller' => 'Jqadm', |
|
15 | - 'action' => 'copy', |
|
16 | - 'config' => array( |
|
17 | - 'BE' => true, |
|
18 | - ), |
|
19 | - ), |
|
20 | - 'create' => array( |
|
21 | - 'controller' => 'Jqadm', |
|
22 | - 'action' => 'create', |
|
23 | - 'config' => array( |
|
24 | - 'BE' => true, |
|
25 | - ), |
|
26 | - ), |
|
27 | - 'delete' => array( |
|
28 | - 'controller' => 'Jqadm', |
|
29 | - 'action' => 'delete', |
|
30 | - 'config' => array( |
|
31 | - 'BE' => true, |
|
32 | - ), |
|
33 | - ), |
|
34 | - 'export' => array( |
|
35 | - 'controller' => 'Jqadm', |
|
36 | - 'action' => 'export', |
|
37 | - 'config' => array( |
|
38 | - 'BE' => true, |
|
39 | - ), |
|
40 | - ), |
|
41 | - 'get' => array( |
|
42 | - 'controller' => 'Jqadm', |
|
43 | - 'action' => 'get', |
|
44 | - 'config' => array( |
|
45 | - 'BE' => true, |
|
46 | - ), |
|
47 | - ), |
|
48 | - 'import' => array( |
|
49 | - 'controller' => 'Jqadm', |
|
50 | - 'action' => 'import', |
|
51 | - 'config' => array( |
|
52 | - 'BE' => true, |
|
53 | - ), |
|
54 | - ), |
|
55 | - 'save' => array( |
|
56 | - 'controller' => 'Jqadm', |
|
57 | - 'action' => 'save', |
|
58 | - 'config' => array( |
|
59 | - 'BE' => true, |
|
60 | - ), |
|
61 | - ), |
|
62 | - 'search' => array( |
|
63 | - 'controller' => 'Jqadm', |
|
64 | - 'action' => 'search', |
|
65 | - 'config' => array( |
|
66 | - 'BE' => true, |
|
67 | - ), |
|
68 | - ), |
|
69 | - ), |
|
70 | - ), |
|
71 | - 'jsonadm' => array( |
|
72 | - 'url' => array( |
|
73 | - 'controller' => 'Jsonadm', |
|
74 | - 'action' => 'index', |
|
75 | - 'config' => array( |
|
76 | - 'absoluteUri' => true, |
|
77 | - 'BE' => true, |
|
78 | - ), |
|
79 | - 'options' => array( |
|
80 | - 'controller' => 'Jsonadm', |
|
81 | - 'action' => 'index', |
|
82 | - 'config' => array( |
|
83 | - 'absoluteUri' => true, |
|
84 | - 'BE' => true, |
|
85 | - ), |
|
86 | - ), |
|
87 | - ), |
|
88 | - ), |
|
4 | + 'jqadm' => array( |
|
5 | + 'url' => array( |
|
6 | + 'batch' => array( |
|
7 | + 'controller' => 'Jqadm', |
|
8 | + 'action' => 'batch', |
|
9 | + 'config' => array( |
|
10 | + 'BE' => true, |
|
11 | + ), |
|
12 | + ), |
|
13 | + 'copy' => array( |
|
14 | + 'controller' => 'Jqadm', |
|
15 | + 'action' => 'copy', |
|
16 | + 'config' => array( |
|
17 | + 'BE' => true, |
|
18 | + ), |
|
19 | + ), |
|
20 | + 'create' => array( |
|
21 | + 'controller' => 'Jqadm', |
|
22 | + 'action' => 'create', |
|
23 | + 'config' => array( |
|
24 | + 'BE' => true, |
|
25 | + ), |
|
26 | + ), |
|
27 | + 'delete' => array( |
|
28 | + 'controller' => 'Jqadm', |
|
29 | + 'action' => 'delete', |
|
30 | + 'config' => array( |
|
31 | + 'BE' => true, |
|
32 | + ), |
|
33 | + ), |
|
34 | + 'export' => array( |
|
35 | + 'controller' => 'Jqadm', |
|
36 | + 'action' => 'export', |
|
37 | + 'config' => array( |
|
38 | + 'BE' => true, |
|
39 | + ), |
|
40 | + ), |
|
41 | + 'get' => array( |
|
42 | + 'controller' => 'Jqadm', |
|
43 | + 'action' => 'get', |
|
44 | + 'config' => array( |
|
45 | + 'BE' => true, |
|
46 | + ), |
|
47 | + ), |
|
48 | + 'import' => array( |
|
49 | + 'controller' => 'Jqadm', |
|
50 | + 'action' => 'import', |
|
51 | + 'config' => array( |
|
52 | + 'BE' => true, |
|
53 | + ), |
|
54 | + ), |
|
55 | + 'save' => array( |
|
56 | + 'controller' => 'Jqadm', |
|
57 | + 'action' => 'save', |
|
58 | + 'config' => array( |
|
59 | + 'BE' => true, |
|
60 | + ), |
|
61 | + ), |
|
62 | + 'search' => array( |
|
63 | + 'controller' => 'Jqadm', |
|
64 | + 'action' => 'search', |
|
65 | + 'config' => array( |
|
66 | + 'BE' => true, |
|
67 | + ), |
|
68 | + ), |
|
69 | + ), |
|
70 | + ), |
|
71 | + 'jsonadm' => array( |
|
72 | + 'url' => array( |
|
73 | + 'controller' => 'Jsonadm', |
|
74 | + 'action' => 'index', |
|
75 | + 'config' => array( |
|
76 | + 'absoluteUri' => true, |
|
77 | + 'BE' => true, |
|
78 | + ), |
|
79 | + 'options' => array( |
|
80 | + 'controller' => 'Jsonadm', |
|
81 | + 'action' => 'index', |
|
82 | + 'config' => array( |
|
83 | + 'absoluteUri' => true, |
|
84 | + 'BE' => true, |
|
85 | + ), |
|
86 | + ), |
|
87 | + ), |
|
88 | + ), |
|
89 | 89 | ); |
@@ -4,67 +4,67 @@ |
||
4 | 4 | $defaultConnection = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']; |
5 | 5 | |
6 | 6 | return [ |
7 | - 'db' => [ |
|
8 | - 'adapter' => 'mysql', |
|
9 | - 'host' => $defaultConnection['host'] ?? null, |
|
10 | - 'port' => $defaultConnection['port'] ?? null, |
|
11 | - 'socket' => $defaultConnection['socket'] ?? null, |
|
12 | - 'database' => $defaultConnection['dbname'] ?? null, |
|
13 | - 'username' => $defaultConnection['user'] ?? null, |
|
14 | - 'password' => $defaultConnection['password'] ?? null, |
|
15 | - 'stmt' => ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"], |
|
16 | - 'defaultTableOptions' => [ |
|
17 | - 'charset' => $defaultConnection['tableoptions']['charset'] ?? 'utf8', |
|
18 | - 'collate' => $defaultConnection['tableoptions']['collate'] ?? 'utf8_unicode_ci', |
|
19 | - ], |
|
20 | - 'limit' => 3, |
|
21 | - ], |
|
22 | - 'fs' => [ |
|
23 | - 'adapter' => 'Standard', |
|
24 | - 'baseurl' => '/uploads/tx_aimeos', |
|
25 | - 'basedir' => $publicPath . '/uploads/tx_aimeos', |
|
26 | - 'tempdir' => $publicPath . '/typo3temp', |
|
27 | - ], |
|
28 | - 'fs-media' => [ |
|
29 | - 'adapter' => 'Standard', |
|
30 | - 'baseurl' => '/uploads/tx_aimeos', |
|
31 | - 'basedir' => $publicPath . '/uploads/tx_aimeos', |
|
32 | - 'tempdir' => $publicPath . '/typo3temp', |
|
33 | - ], |
|
34 | - 'fs-mimeicon' => [ |
|
35 | - 'adapter' => 'Standard', |
|
36 | - 'baseurl' => '/typo3conf/ext/aimeos/Resources/Public/Images/Mimeicons', |
|
37 | - 'basedir' => $publicPath . '/typo3conf/ext/aimeos/Resources/Public/Images/Mimeicons', |
|
38 | - 'tempdir' => $publicPath . '/typo3temp', |
|
39 | - ], |
|
40 | - 'fs-theme' => [ |
|
41 | - 'adapter' => 'Standard', |
|
42 | - 'baseurl' => '/typo3conf/ext/aimeos/Resources/Public/Themes', |
|
43 | - 'basedir' => $publicPath . '/typo3conf/ext/aimeos/Resources/Public/Themes', |
|
44 | - 'tempdir' => $publicPath . '/typo3temp', |
|
45 | - ], |
|
46 | - 'fs-admin' => [ |
|
47 | - 'adapter' => 'Standard', |
|
48 | - 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/admin', |
|
49 | - 'tempdir' => $publicPath . '/typo3temp', |
|
50 | - ], |
|
51 | - 'fs-export' => [ |
|
52 | - 'adapter' => 'Standard', |
|
53 | - 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/export', |
|
54 | - 'tempdir' => $publicPath . '/typo3temp', |
|
55 | - ], |
|
56 | - 'fs-import' => [ |
|
57 | - 'adapter' => 'Standard', |
|
58 | - 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/import', |
|
59 | - 'tempdir' => $publicPath . '/typo3temp', |
|
60 | - ], |
|
61 | - 'fs-secure' => [ |
|
62 | - 'adapter' => 'Standard', |
|
63 | - 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure', |
|
64 | - 'tempdir' => $publicPath . '/typo3temp', |
|
65 | - ], |
|
66 | - 'mq' => [ |
|
67 | - 'adapter' => 'Standard', |
|
68 | - 'db' => 'db', |
|
69 | - ], |
|
7 | + 'db' => [ |
|
8 | + 'adapter' => 'mysql', |
|
9 | + 'host' => $defaultConnection['host'] ?? null, |
|
10 | + 'port' => $defaultConnection['port'] ?? null, |
|
11 | + 'socket' => $defaultConnection['socket'] ?? null, |
|
12 | + 'database' => $defaultConnection['dbname'] ?? null, |
|
13 | + 'username' => $defaultConnection['user'] ?? null, |
|
14 | + 'password' => $defaultConnection['password'] ?? null, |
|
15 | + 'stmt' => ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"], |
|
16 | + 'defaultTableOptions' => [ |
|
17 | + 'charset' => $defaultConnection['tableoptions']['charset'] ?? 'utf8', |
|
18 | + 'collate' => $defaultConnection['tableoptions']['collate'] ?? 'utf8_unicode_ci', |
|
19 | + ], |
|
20 | + 'limit' => 3, |
|
21 | + ], |
|
22 | + 'fs' => [ |
|
23 | + 'adapter' => 'Standard', |
|
24 | + 'baseurl' => '/uploads/tx_aimeos', |
|
25 | + 'basedir' => $publicPath . '/uploads/tx_aimeos', |
|
26 | + 'tempdir' => $publicPath . '/typo3temp', |
|
27 | + ], |
|
28 | + 'fs-media' => [ |
|
29 | + 'adapter' => 'Standard', |
|
30 | + 'baseurl' => '/uploads/tx_aimeos', |
|
31 | + 'basedir' => $publicPath . '/uploads/tx_aimeos', |
|
32 | + 'tempdir' => $publicPath . '/typo3temp', |
|
33 | + ], |
|
34 | + 'fs-mimeicon' => [ |
|
35 | + 'adapter' => 'Standard', |
|
36 | + 'baseurl' => '/typo3conf/ext/aimeos/Resources/Public/Images/Mimeicons', |
|
37 | + 'basedir' => $publicPath . '/typo3conf/ext/aimeos/Resources/Public/Images/Mimeicons', |
|
38 | + 'tempdir' => $publicPath . '/typo3temp', |
|
39 | + ], |
|
40 | + 'fs-theme' => [ |
|
41 | + 'adapter' => 'Standard', |
|
42 | + 'baseurl' => '/typo3conf/ext/aimeos/Resources/Public/Themes', |
|
43 | + 'basedir' => $publicPath . '/typo3conf/ext/aimeos/Resources/Public/Themes', |
|
44 | + 'tempdir' => $publicPath . '/typo3temp', |
|
45 | + ], |
|
46 | + 'fs-admin' => [ |
|
47 | + 'adapter' => 'Standard', |
|
48 | + 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/admin', |
|
49 | + 'tempdir' => $publicPath . '/typo3temp', |
|
50 | + ], |
|
51 | + 'fs-export' => [ |
|
52 | + 'adapter' => 'Standard', |
|
53 | + 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/export', |
|
54 | + 'tempdir' => $publicPath . '/typo3temp', |
|
55 | + ], |
|
56 | + 'fs-import' => [ |
|
57 | + 'adapter' => 'Standard', |
|
58 | + 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/import', |
|
59 | + 'tempdir' => $publicPath . '/typo3temp', |
|
60 | + ], |
|
61 | + 'fs-secure' => [ |
|
62 | + 'adapter' => 'Standard', |
|
63 | + 'basedir' => $publicPath . '/uploads/tx_aimeos/.secure', |
|
64 | + 'tempdir' => $publicPath . '/typo3temp', |
|
65 | + ], |
|
66 | + 'mq' => [ |
|
67 | + 'adapter' => 'Standard', |
|
68 | + 'db' => 'db', |
|
69 | + ], |
|
70 | 70 | ]; |