@@ -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, |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | $this->assertNodeCount(1, 'fr'); |
52 | 52 | $this->assertNodeCount(0, 'en'); |
53 | 53 | |
54 | - $crawler = $this->client->request('GET', '/admin/site/form/' . $this->siteId); |
|
54 | + $crawler = $this->client->request('GET', '/admin/site/form/'.$this->siteId); |
|
55 | 55 | $form = $crawler->selectButton('Save')->form(); |
56 | - foreach($form->all() as $key => $value){ |
|
56 | + foreach ($form->all() as $key => $value) { |
|
57 | 57 | if (preg_match('/^oo_site\[aliases\]\[.*\]\[language\]$/', $key)) { |
58 | 58 | $form[$key] = 'en'; |
59 | 59 | } |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | */ |
86 | 86 | protected function createSite() |
87 | 87 | { |
88 | - $crawler = $this->client->request('GET', '/admin/site/new'); |
|
88 | + $crawler = $this->client->request('GET', '/admin/site/new'); |
|
89 | 89 | |
90 | 90 | $form = $crawler->selectButton('Save')->form(); |
91 | 91 | $form['oo_site[siteId]'] = $this->siteId; |
92 | - $form['oo_site[name]'] = $this->siteId . 'domain'; |
|
93 | - foreach($form->all() as $key => $value){ |
|
92 | + $form['oo_site[name]'] = $this->siteId.'domain'; |
|
93 | + foreach ($form->all() as $key => $value) { |
|
94 | 94 | if (preg_match('/^oo_site\[aliases\]\[.*\]\[domain\]$/', $key)) { |
95 | - $form[$key] = $this->siteId . 'name'; |
|
95 | + $form[$key] = $this->siteId.'name'; |
|
96 | 96 | } |
97 | 97 | if (preg_match('/^oo_site\[aliases\]\[.*\]\[language\]$/', $key)) { |
98 | 98 | $form[$key] = 'fr'; |
@@ -114,9 +114,9 @@ |
||
114 | 114 | */ |
115 | 115 | protected function assertNodeCount($count, $language) |
116 | 116 | { |
117 | - $nodes = $this->nodeRepository->findNotDeletedSortByUpdatedAt(NodeInterface::ROOT_NODE_ID, $language, $this->siteId); |
|
117 | + $nodes = $this->nodeRepository->findNotDeletedSortByUpdatedAt(NodeInterface::ROOT_NODE_ID, $language, $this->siteId); |
|
118 | 118 | |
119 | - $this->assertCount($count, $nodes); |
|
119 | + $this->assertCount($count, $nodes); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -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); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | $nodeDocument = $this->nodeRepository->findInLastVersion($nodeId, $this->language, $this->siteId); |
42 | 42 | |
43 | - $url = '/admin/node/form/' . $this->siteId . '/' . $nodeDocument->getNodeId() . '/' . $this->language . '/' . $nodeDocument->getVersion(); |
|
43 | + $url = '/admin/node/form/'.$this->siteId.'/'.$nodeDocument->getNodeId().'/'.$this->language.'/'.$nodeDocument->getVersion(); |
|
44 | 44 | |
45 | 45 | $crawler = $this->client->request('GET', $url); |
46 | 46 | $formNode = $crawler->selectButton('Save')->form(); |