@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $status = $this->statusRepository->findOneByInitial(); |
33 | 33 | |
34 | - $this->client->request('DELETE', '/api/status/' . $status->getId() . '/delete'); |
|
34 | + $this->client->request('DELETE', '/api/status/'.$status->getId().'/delete'); |
|
35 | 35 | |
36 | 36 | $this->assertSame(403, $this->client->getResponse()->getStatusCode()); |
37 | 37 | $this->assertContains('open_orchestra_workflow_admin.status.delete.impossible', $this->client->getResponse()->getContent()); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function testFindForPaginate(PaginateFinderConfiguration $configuration, $expectedCount, $expectedFilteredCount) |
42 | 42 | { |
43 | - $this->assertCount($expectedCount, $this->repository->findForPaginate($configuration)); |
|
43 | + $this->assertCount($expectedCount, $this->repository->findForPaginate($configuration)); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -96,6 +96,6 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function testCountWithFilter(PaginateFinderConfiguration $configuration, $expectedCount, $expectedFilteredCount) |
98 | 98 | { |
99 | - $this->assertSame($expectedFilteredCount, $this->repository->countWithFilter($configuration)); |
|
99 | + $this->assertSame($expectedFilteredCount, $this->repository->countWithFilter($configuration)); |
|
100 | + } |
|
100 | 101 | } |
101 | - } |
@@ -56,16 +56,16 @@ |
||
56 | 56 | 'user_name' => 'extra.user_name', |
57 | 57 | 'message' => 'message' |
58 | 58 | ); |
59 | - $conf1 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array( |
|
59 | + $conf1 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array( |
|
60 | 60 | 'site_id' => 'fixture' |
61 | 61 | )); |
62 | - $conf2 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array( |
|
62 | + $conf2 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array( |
|
63 | 63 | 'site_id' => 'fixture', 'date' => '2016/02/10', 'date-format' => 'yy/mm/dd' |
64 | 64 | )); |
65 | - $conf3 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array( |
|
65 | + $conf3 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array( |
|
66 | 66 | 'site_id' => 'fixture', 'user_ip' => '5' |
67 | 67 | )); |
68 | - $conf4 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array( |
|
68 | + $conf4 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array( |
|
69 | 69 | 'site_id' => 'fixture', 'user_name' => 'developer' |
70 | 70 | )); |
71 | 71 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function testApi($url) |
20 | 20 | { |
21 | - $this->client->request('GET', $url . '?access_token=' . $this->getAccessToken()); |
|
21 | + $this->client->request('GET', $url.'?access_token='.$this->getAccessToken()); |
|
22 | 22 | |
23 | 23 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
24 | 24 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
@@ -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 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $mediaFolderRepository = static::$kernel->getContainer()->get('open_orchestra_media.repository.media_folder'); |
49 | 49 | $mediaFolder = $mediaFolderRepository->findOneByName('Images'); |
50 | 50 | |
51 | - $url = '/admin/folder/form/' . $mediaFolder->getId(); |
|
51 | + $url = '/admin/folder/form/'.$mediaFolder->getId(); |
|
52 | 52 | $crawler = $this->client->request('GET', $url); |
53 | 53 | |
54 | 54 | return $crawler; |
@@ -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, |
@@ -34,16 +34,16 @@ |
||
34 | 34 | */ |
35 | 35 | public function testFormController() |
36 | 36 | { |
37 | - $contentTypes = $this->contentTypeRepository->findAll(); |
|
38 | - $contentTypeCount = count($contentTypes); |
|
37 | + $contentTypes = $this->contentTypeRepository->findAll(); |
|
38 | + $contentTypeCount = count($contentTypes); |
|
39 | 39 | |
40 | - $crawler = $this->client->request('GET', '/admin/content-type/form/news'); |
|
41 | - $form = $crawler->selectButton('Save')->form(); |
|
40 | + $crawler = $this->client->request('GET', '/admin/content-type/form/news'); |
|
41 | + $form = $crawler->selectButton('Save')->form(); |
|
42 | 42 | |
43 | - $this->submitForm($form); |
|
43 | + $this->submitForm($form); |
|
44 | 44 | |
45 | - $contentTypes = $this->contentTypeRepository->findAll(); |
|
46 | - $this->assertCount($contentTypeCount + 1, $contentTypes); |
|
45 | + $contentTypes = $this->contentTypeRepository->findAll(); |
|
46 | + $this->assertCount($contentTypeCount + 1, $contentTypes); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -45,21 +45,21 @@ |
||
45 | 45 | $nodeRoot = $this->nodeRepository->findInLastVersion(NodeInterface::ROOT_NODE_ID, $this->language, $this->siteId); |
46 | 46 | $nodeFixtureCommunity = $this->nodeRepository->findInLastVersion('fixture_page_community', $this->language, $this->siteId); |
47 | 47 | |
48 | - $url = '/admin/node/form/' . $this->siteId . '/' . $nodeRoot->getNodeId(). '/' . $this->language . '/' . $nodeRoot->getVersion(); |
|
49 | - $this->client->request('GET', $url); |
|
50 | - $this->assertForm($this->client->getResponse()); |
|
48 | + $url = '/admin/node/form/' . $this->siteId . '/' . $nodeRoot->getNodeId(). '/' . $this->language . '/' . $nodeRoot->getVersion(); |
|
49 | + $this->client->request('GET', $url); |
|
50 | + $this->assertForm($this->client->getResponse()); |
|
51 | 51 | |
52 | - $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
53 | - $this->client->request('GET', $url); |
|
54 | - $this->assertForm($this->client->getResponse()); |
|
52 | + $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
53 | + $this->client->request('GET', $url); |
|
54 | + $this->assertForm($this->client->getResponse()); |
|
55 | 55 | |
56 | - $url = '/admin/node/form/' . $this->siteId . '/' . $nodeFixtureCommunity->getNodeId(). '/' . $this->language . '/' . $nodeFixtureCommunity->getVersion(); |
|
57 | - $this->client->request('GET', $url); |
|
58 | - $this->assertForm($this->client->getResponse()); |
|
56 | + $url = '/admin/node/form/' . $this->siteId . '/' . $nodeFixtureCommunity->getNodeId(). '/' . $this->language . '/' . $nodeFixtureCommunity->getVersion(); |
|
57 | + $this->client->request('GET', $url); |
|
58 | + $this->assertForm($this->client->getResponse()); |
|
59 | 59 | |
60 | - $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
61 | - $this->client->request('GET', $url); |
|
62 | - $this->assertForm($this->client->getResponse()); |
|
60 | + $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
61 | + $this->client->request('GET', $url); |
|
62 | + $this->assertForm($this->client->getResponse()); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -45,19 +45,19 @@ discard block |
||
45 | 45 | $nodeRoot = $this->nodeRepository->findInLastVersion(NodeInterface::ROOT_NODE_ID, $this->language, $this->siteId); |
46 | 46 | $nodeFixtureCommunity = $this->nodeRepository->findInLastVersion('fixture_page_community', $this->language, $this->siteId); |
47 | 47 | |
48 | - $url = '/admin/node/form/' . $this->siteId . '/' . $nodeRoot->getNodeId(). '/' . $this->language . '/' . $nodeRoot->getVersion(); |
|
48 | + $url = '/admin/node/form/'.$this->siteId.'/'.$nodeRoot->getNodeId().'/'.$this->language.'/'.$nodeRoot->getVersion(); |
|
49 | 49 | $this->client->request('GET', $url); |
50 | 50 | $this->assertForm($this->client->getResponse()); |
51 | 51 | |
52 | - $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
52 | + $url = '/admin/node/new/'.$this->siteId.'/'.$this->language.'/'.$nodeRoot->getNodeId().'/0'; |
|
53 | 53 | $this->client->request('GET', $url); |
54 | 54 | $this->assertForm($this->client->getResponse()); |
55 | 55 | |
56 | - $url = '/admin/node/form/' . $this->siteId . '/' . $nodeFixtureCommunity->getNodeId(). '/' . $this->language . '/' . $nodeFixtureCommunity->getVersion(); |
|
56 | + $url = '/admin/node/form/'.$this->siteId.'/'.$nodeFixtureCommunity->getNodeId().'/'.$this->language.'/'.$nodeFixtureCommunity->getVersion(); |
|
57 | 57 | $this->client->request('GET', $url); |
58 | 58 | $this->assertForm($this->client->getResponse()); |
59 | 59 | |
60 | - $url = '/admin/node/new/' . $this->siteId . '/' . $this->language . '/' . $nodeRoot->getNodeId() . '/0'; |
|
60 | + $url = '/admin/node/new/'.$this->siteId.'/'.$this->language.'/'.$nodeRoot->getNodeId().'/0'; |
|
61 | 61 | $this->client->request('GET', $url); |
62 | 62 | $this->assertForm($this->client->getResponse()); |
63 | 63 | } |
@@ -73,15 +73,15 @@ discard block |
||
73 | 73 | |
74 | 74 | $formNode = $crawler->selectButton('Save')->form(); |
75 | 75 | |
76 | - $nodeName = 'fixturetest' . time(); |
|
76 | + $nodeName = 'fixturetest'.time(); |
|
77 | 77 | $formNode['oo_node[name]'] = $nodeName; |
78 | 78 | $formNode['oo_node[nodeTemplateSelection][nodeSource]'] = 'root'; |
79 | - $formNode['oo_node[routePattern]'] = '/page-test' .time(); |
|
79 | + $formNode['oo_node[routePattern]'] = '/page-test'.time(); |
|
80 | 80 | |
81 | 81 | $this->submitForm($formNode); |
82 | 82 | |
83 | 83 | $node = static::$kernel->getContainer()->get('open_orchestra_model.repository.node')->findOneByName($nodeName); |
84 | - $this->client->request('GET', '/api/node/show/' . $node->getNodeId() . '/' . $node->getSiteId() . '/' . $node->getLanguage() . '/' . $node->getVersion()); |
|
84 | + $this->client->request('GET', '/api/node/show/'.$node->getNodeId().'/'.$node->getSiteId().'/'.$node->getLanguage().'/'.$node->getVersion()); |
|
85 | 85 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
86 | 86 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
87 | 87 | $node = json_decode($this->client->getResponse()->getContent()); |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | $this->changeNodeStatusWithRouteRedirectionTest($nodeId, $statuses[2], $redirectionCount, $routeDocumentCount); |
102 | 102 | $this->changeNodeStatusWithRouteRedirectionTest($nodeId, $statuses[1], $redirectionCount, $routeDocumentCount + 2); |
103 | 103 | |
104 | - $this->client->request('POST', '/api/node/new-version/' . $nodeName . '/fr/' . $node->version, array()); |
|
104 | + $this->client->request('POST', '/api/node/new-version/'.$nodeName.'/fr/'.$node->version, array()); |
|
105 | 105 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
106 | 106 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
107 | 107 | |
108 | 108 | $newNode = $this->nodeRepository->findInLastVersion($nodeName, $node->language, $this->siteId); |
109 | - $newNode->setRoutePattern('/page-test' .time()); |
|
109 | + $newNode->setRoutePattern('/page-test'.time()); |
|
110 | 110 | $this->documentManager->persist($newNode); |
111 | 111 | $this->documentManager->flush($newNode); |
112 | 112 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | static::$kernel->getContainer()->get('object_manager')->flush(); |
124 | 124 | |
125 | - $this->client->request('DELETE', '/api/node/delete/' . $nodeName); |
|
125 | + $this->client->request('DELETE', '/api/node/delete/'.$nodeName); |
|
126 | 126 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
127 | 127 | |
128 | 128 | $this->assertEquals(1, count($this->redirectionRepository->findAll())); |
@@ -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(); |