@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function load(ObjectManager $manager) |
44 | 44 | { |
45 | - for ($i=0; self::NUMBER_OF_NODE > $i; $i++) { |
|
46 | - $name = 'node' . $i; |
|
47 | - $pattern = '/node' . $i; |
|
48 | - $content = 'Node ' . $i . 'on ' . self::NUMBER_OF_NODE; |
|
45 | + for ($i = 0; self::NUMBER_OF_NODE > $i; $i++) { |
|
46 | + $name = 'node'.$i; |
|
47 | + $pattern = '/node'.$i; |
|
48 | + $content = 'Node '.$i.'on '.self::NUMBER_OF_NODE; |
|
49 | 49 | $this->generateSimpleNode($name, 'en', $manager, $content, $pattern); |
50 | 50 | $this->generateSimpleNode($name, 'fr', $manager, $content, $pattern); |
51 | 51 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $titleBlock = new Block(); |
79 | 79 | $titleBlock->setClass('block-body-header'); |
80 | 80 | $titleBlock->setComponent(TinyMCEWysiwygStrategy::TINYMCEWYSIWYG); |
81 | - $titleBlock->setAttributes(array('htmlContent' => '<h1>' . $name . '</h1>')); |
|
81 | + $titleBlock->setAttributes(array('htmlContent' => '<h1>'.$name.'</h1>')); |
|
82 | 82 | |
83 | 83 | $contentBlock = new Block(); |
84 | 84 | $contentBlock->setClass('block-body'); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * @param $data |
|
168 | + * @param BlockInterface $data |
|
169 | 169 | */ |
170 | 170 | protected function assertBlock($data) |
171 | 171 | { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | /** |
178 | 178 | * @param string $condition |
179 | 179 | * |
180 | - * @return array |
|
180 | + * @return string |
|
181 | 181 | */ |
182 | 182 | protected function replaceKeywordLabelById($condition) |
183 | 183 | { |
@@ -48,20 +48,20 @@ discard block |
||
48 | 48 | $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
49 | 49 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
50 | 50 | |
51 | - $form->submit(array( |
|
52 | - 'style' => 'default', |
|
53 | - 'videoType' => 'youtube', |
|
54 | - 'youtubeVideoId' => 'videoId', |
|
55 | - 'youtubeAutoplay' => true, |
|
56 | - )); |
|
57 | - |
|
58 | - $this->assertTrue($form->isSynchronized()); |
|
59 | - /** @var BlockInterface $data */ |
|
60 | - $data = $form->getConfig()->getData(); |
|
61 | - $this->assertBlock($data); |
|
62 | - $this->assertSame('videoId', $data->getAttribute('youtubeVideoId')); |
|
63 | - $this->assertTrue($data->getAttribute('youtubeAutoplay')); |
|
64 | - $this->assertFalse($data->getAttribute('youtubeFs')); |
|
51 | + $form->submit(array( |
|
52 | + 'style' => 'default', |
|
53 | + 'videoType' => 'youtube', |
|
54 | + 'youtubeVideoId' => 'videoId', |
|
55 | + 'youtubeAutoplay' => true, |
|
56 | + )); |
|
57 | + |
|
58 | + $this->assertTrue($form->isSynchronized()); |
|
59 | + /** @var BlockInterface $data */ |
|
60 | + $data = $form->getConfig()->getData(); |
|
61 | + $this->assertBlock($data); |
|
62 | + $this->assertSame('videoId', $data->getAttribute('youtubeVideoId')); |
|
63 | + $this->assertTrue($data->getAttribute('youtubeAutoplay')); |
|
64 | + $this->assertFalse($data->getAttribute('youtubeFs')); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | array(ContentListStrategy::NAME, array( |
100 | 100 | 'contentNodeId' => 'root', |
101 | 101 | 'contentSearch' => array( |
102 | - 'contentType' => 'news', |
|
103 | - 'choiceType' => 'choice_and', |
|
104 | - 'keywords' => null, |
|
102 | + 'contentType' => 'news', |
|
103 | + 'choiceType' => 'choice_and', |
|
104 | + 'keywords' => null, |
|
105 | 105 | ), |
106 | 106 | 'characterNumber' => 150, |
107 | 107 | 'contentTemplateEnabled' => true, |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $block->setComponent(VideoStrategy::NAME); |
46 | 46 | $block->addAttribute('videoType', 'youtube'); |
47 | 47 | $block->addAttribute('youtubeFs', true); |
48 | - $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
48 | + $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
49 | 49 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
50 | 50 | |
51 | 51 | $form->submit(array( |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | $block = new Block(); |
76 | 76 | $block->setComponent($component); |
77 | - $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
77 | + $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
78 | 78 | |
79 | 79 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
80 | 80 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | { |
129 | 129 | $block = new Block(); |
130 | 130 | $block->setComponent($component); |
131 | - $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
131 | + $formType = static::$kernel->getContainer()->get('open_orchestra_backoffice.generate_form_manager')->getFormType($block); |
|
132 | 132 | |
133 | 133 | $form = $this->formFactory->create($formType, $block, array('csrf_protection' => false)); |
134 | 134 | $submittedValue = array_merge(array('style' => 'default'), $value); |
@@ -548,7 +548,7 @@ |
||
548 | 548 | /** |
549 | 549 | * @param string $condition |
550 | 550 | * |
551 | - * @return array |
|
551 | + * @return string |
|
552 | 552 | */ |
553 | 553 | protected function replaceKeywordLabelById($condition) |
554 | 554 | { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | { |
161 | 161 | return array( |
162 | 162 | array('car', ContentRepositoryInterface::CHOICE_AND, 'lorem', 3), |
163 | - array('car',ContentRepositoryInterface::CHOICE_AND, 'sit', 1), |
|
163 | + array('car', ContentRepositoryInterface::CHOICE_AND, 'sit', 1), |
|
164 | 164 | array('car', ContentRepositoryInterface::CHOICE_AND, 'dolor', 0), |
165 | 165 | array('car', ContentRepositoryInterface::CHOICE_AND, 'sit AND lorem', 1), |
166 | 166 | array('news', ContentRepositoryInterface::CHOICE_AND, 'lorem', 1), |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | 'fields.tinimce_test.string_value' => 'attributes.tinimce_test.stringValue', |
302 | 302 | ); |
303 | 303 | |
304 | - $searchTypes = array ( |
|
304 | + $searchTypes = array( |
|
305 | 305 | 'attributes.car_name' => 'text', |
306 | 306 | 'attributes.description' => 'text', |
307 | 307 | 'attributes.on_market' => 'date', |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $contents = $this->repository->findForPaginateFilterByContentTypeSiteAndLanguage($configuration, $contentType, $siteId, $language, $searchTypes); |
314 | 314 | $repositoryCount = $this->repository->countWithFilterAndContentTypeSiteAndLanguage($configuration, $contentType, $siteId, $language, $searchTypes); |
315 | 315 | |
316 | - if(!is_null($name)) { |
|
316 | + if (!is_null($name)) { |
|
317 | 317 | $this->assertEquals($name, $contents[0]->getName()); |
318 | 318 | } |
319 | 319 | $this->assertCount($count, $contents); |
@@ -326,16 +326,16 @@ discard block |
||
326 | 326 | public function provideContentTypeAndPaginateAndSearchAndsiteId() |
327 | 327 | { |
328 | 328 | return array( |
329 | - 1 => array('car', null, array("name" => "name", "dir" => "asc"), '2', 0 ,5 , 'en', 3, 3, '206 3 portes en'), |
|
330 | - 2 => array('car', null, array("name" => "name", "dir" => "desc"), '2', 0 ,5 , 'en', 3, 3, 'R5 3 portes en'), |
|
331 | - 3 => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "asc"), '2', 0 ,5 , 'en', 3, 3, '206 3 portes en'), |
|
332 | - 4 => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "desc"),'2', 0 ,5 , 'en', 3, 3, 'R5 3 portes en'), |
|
333 | - 5 => array('car', null, null, null, 0 ,1 , 'en', 1, 2), |
|
334 | - 6 => array('car', array('attributes.car_name' => '206'), null, '2', 0 , 2 , 'en', 1, 1), |
|
335 | - 7 => array('news', null, null, '2', 0 , 100, 'fr', 4, 4), |
|
336 | - 8 => array('news', null, null, '2', 50 , 100, 'en', 0, 0), |
|
337 | - 9 => array('news', array('name' => 'news'), null, '2', 0 , null, 'fr', 0, 0), |
|
338 | - 10 => array('car', null, null, '2', 0 ,5 , 'en', 3, 3), |
|
329 | + 1 => array('car', null, array("name" => "name", "dir" => "asc"), '2', 0, 5, 'en', 3, 3, '206 3 portes en'), |
|
330 | + 2 => array('car', null, array("name" => "name", "dir" => "desc"), '2', 0, 5, 'en', 3, 3, 'R5 3 portes en'), |
|
331 | + 3 => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "asc"), '2', 0, 5, 'en', 3, 3, '206 3 portes en'), |
|
332 | + 4 => array('car', null, array("name" => "fields.car_name.string_value", "dir" => "desc"), '2', 0, 5, 'en', 3, 3, 'R5 3 portes en'), |
|
333 | + 5 => array('car', null, null, null, 0, 1, 'en', 1, 2), |
|
334 | + 6 => array('car', array('attributes.car_name' => '206'), null, '2', 0, 2, 'en', 1, 1), |
|
335 | + 7 => array('news', null, null, '2', 0, 100, 'fr', 4, 4), |
|
336 | + 8 => array('news', null, null, '2', 50, 100, 'en', 0, 0), |
|
337 | + 9 => array('news', array('name' => 'news'), null, '2', 0, null, 'fr', 0, 0), |
|
338 | + 10 => array('car', null, null, '2', 0, 5, 'en', 3, 3), |
|
339 | 339 | ); |
340 | 340 | } |
341 | 341 | |
@@ -470,63 +470,63 @@ discard block |
||
470 | 470 | */ |
471 | 471 | protected function getDescriptionColumnEntity() |
472 | 472 | { |
473 | - return array ( |
|
473 | + return array( |
|
474 | 474 | 'name' => |
475 | - array ( |
|
475 | + array( |
|
476 | 476 | 'key' => 'name', |
477 | 477 | 'field' => 'name', |
478 | 478 | 'type' => 'string', |
479 | 479 | ), |
480 | 480 | 'language' => |
481 | - array ( |
|
481 | + array( |
|
482 | 482 | 'key' => 'language', |
483 | 483 | 'field' => 'language', |
484 | 484 | 'type' => 'string', |
485 | 485 | ), |
486 | 486 | 'status_label' => |
487 | - array ( |
|
487 | + array( |
|
488 | 488 | 'key' => 'status_label', |
489 | 489 | 'field' => 'status', |
490 | 490 | 'type' => 'multiLanguages', |
491 | 491 | ), |
492 | 492 | 'version' => |
493 | - array ( |
|
493 | + array( |
|
494 | 494 | 'key' => 'version', |
495 | 495 | 'field' => 'version', |
496 | 496 | 'type' => 'integer', |
497 | 497 | ), |
498 | 498 | 'linked_to_site' => |
499 | - array ( |
|
499 | + array( |
|
500 | 500 | 'key' => 'linked_to_site', |
501 | 501 | 'field' => 'linkedTosite', |
502 | 502 | 'type' => 'boolean', |
503 | 503 | ), |
504 | 504 | 'created_by' => |
505 | - array ( |
|
505 | + array( |
|
506 | 506 | 'key' => 'created_by', |
507 | 507 | 'field' => 'createdBy', |
508 | 508 | 'type' => 'string', |
509 | 509 | ), |
510 | 510 | 'updated_by' => |
511 | - array ( |
|
511 | + array( |
|
512 | 512 | 'key' => 'updated_by', |
513 | 513 | 'field' => 'updatedBy', |
514 | 514 | 'type' => 'string', |
515 | 515 | ), |
516 | 516 | 'created_at' => |
517 | - array ( |
|
517 | + array( |
|
518 | 518 | 'key' => 'created_at', |
519 | 519 | 'field' => 'createdAt', |
520 | 520 | 'type' => 'date', |
521 | 521 | ), |
522 | 522 | 'updated_at' => |
523 | - array ( |
|
523 | + array( |
|
524 | 524 | 'key' => 'updated_at', |
525 | 525 | 'field' => 'updatedAt', |
526 | 526 | 'type' => 'date', |
527 | 527 | ), |
528 | 528 | 'deleted' => |
529 | - array ( |
|
529 | + array( |
|
530 | 530 | 'key' => 'deleted', |
531 | 531 | 'field' => 'deleted', |
532 | 532 | 'type' => 'boolean', |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $tokenReponse = json_decode($this->client->getResponse()->getContent(), true); |
37 | 37 | $refreshToken = $tokenReponse['refresh_token']; |
38 | 38 | |
39 | - $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token=' . $refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret')); |
|
39 | + $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token='.$refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret')); |
|
40 | 40 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
41 | 41 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
42 | 42 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | $this->client->request( |
55 | 55 | 'POST', |
56 | - '/api/content/' . $content->getId() . '/update', |
|
56 | + '/api/content/'.$content->getId().'/update', |
|
57 | 57 | array(), |
58 | 58 | array(), |
59 | 59 | array(), |
@@ -47,18 +47,18 @@ |
||
47 | 47 | $accessToken = $tokenReponse['access_token']; |
48 | 48 | $refreshToken = $tokenReponse['refresh_token']; |
49 | 49 | |
50 | - $this->client->request('GET', '/api/node/root?access_token=' . $accessToken); |
|
50 | + $this->client->request('GET', '/api/node/root?access_token='.$accessToken); |
|
51 | 51 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
52 | 52 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
53 | 53 | |
54 | - $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token=' . $refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret')); |
|
54 | + $this->client->request('GET', '/oauth/access_token?grant_type=refresh_token&refresh_token='.$refreshToken, array(), array(), array('PHP_AUTH_USER' => 'test_key', 'PHP_AUTH_PW' => 'test_secret')); |
|
55 | 55 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
56 | 56 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
57 | 57 | $newTokenReponse = json_decode($this->client->getResponse()->getContent(), true); |
58 | 58 | $newAccessToken = $newTokenReponse['access_token']; |
59 | 59 | $this->assertNotSame($accessToken, $newAccessToken); |
60 | 60 | |
61 | - $this->client->request('GET', '/api/node/root?access_token=' . $newAccessToken); |
|
61 | + $this->client->request('GET', '/api/node/root?access_token='.$newAccessToken); |
|
62 | 62 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
63 | 63 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
64 | 64 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | public function setUp() |
17 | 17 | { |
18 | 18 | parent::setUp(); |
19 | - $dirs = array('OpenOrchestra\FunctionalTests\Mapping\Metadata\Driver\FakeClass' => __DIR__ . '/xml'); |
|
19 | + $dirs = array('OpenOrchestra\FunctionalTests\Mapping\Metadata\Driver\FakeClass' => __DIR__.'/xml'); |
|
20 | 20 | $fileLocaltor = new FileLocator($dirs); |
21 | 21 | |
22 | 22 | $this->driver = new XmlDriver($fileLocaltor, |
@@ -16,7 +16,7 @@ |
||
16 | 16 | public function setUp() |
17 | 17 | { |
18 | 18 | parent::setUp(); |
19 | - $dirs = array('OpenOrchestra\FunctionalTests\Mapping\Metadata\Driver\FakeClass' => __DIR__ . '/yml'); |
|
19 | + $dirs = array('OpenOrchestra\FunctionalTests\Mapping\Metadata\Driver\FakeClass' => __DIR__.'/yml'); |
|
20 | 20 | $fileLocator = new FileLocator($dirs); |
21 | 21 | |
22 | 22 | $this->driver = new YamlDriver($fileLocator, |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function testDifferentEnv($classExpected, $env, $debug) |
22 | 22 | { |
23 | - $kernel = static::createKernel(array('environment' => $env ,'debug' => $debug)); |
|
23 | + $kernel = static::createKernel(array('environment' => $env, 'debug' => $debug)); |
|
24 | 24 | $kernel->boot(); |
25 | 25 | $this->assertInstanceOf( |
26 | 26 | $classExpected, |