@@ -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(); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function testEditForm() |
30 | 30 | { |
31 | 31 | $user = $this->client->getContainer()->get('open_orchestra_user.repository.user')->findOneByUsername('p-admin'); |
32 | - $this->client->request('GET', '/admin/user/form/' . $user->getId()); |
|
32 | + $this->client->request('GET', '/admin/user/form/'.$user->getId()); |
|
33 | 33 | $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); |
34 | 34 | } |
35 | 35 | } |
@@ -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 | } |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | |
76 | 76 | $formNode = $crawler->selectButton('Save')->form(); |
77 | 77 | |
78 | - $nodeName = 'fixturetest' . time(); |
|
78 | + $nodeName = 'fixturetest'.time(); |
|
79 | 79 | $formNode['oo_node[name]'] = $nodeName; |
80 | 80 | $formNode['oo_node[nodeTemplateSelection][nodeSource]'] = 'root'; |
81 | - $formNode['oo_node[routePattern]'] = '/page-test' .time(); |
|
81 | + $formNode['oo_node[routePattern]'] = '/page-test'.time(); |
|
82 | 82 | |
83 | 83 | $this->submitForm($formNode); |
84 | 84 | |
85 | - $this->client->request('GET', '/api/node/' . $nodeName); |
|
85 | + $this->client->request('GET', '/api/node/'.$nodeName); |
|
86 | 86 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
87 | 87 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
88 | 88 | $node = json_decode($this->client->getResponse()->getContent()); |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $this->changeNodeStatusWithRouteRedirectionTest($nodeId, $statuses[2], 1, $routeDocumentCount); |
101 | 101 | $this->changeNodeStatusWithRouteRedirectionTest($nodeId, $statuses[1], 1, $routeDocumentCount + 2); |
102 | 102 | |
103 | - $this->client->request('POST', '/api/node/' . $nodeName . '/new-version/1?language=' . $node->language, array()); |
|
103 | + $this->client->request('POST', '/api/node/'.$nodeName.'/new-version/1?language='.$node->language, array()); |
|
104 | 104 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
105 | 105 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
106 | 106 | |
107 | 107 | $newNode = $this->nodeRepository->findInLastVersion($nodeName, $node->language, $this->siteId); |
108 | - $newNode->setRoutePattern('/page-test' .time()); |
|
108 | + $newNode->setRoutePattern('/page-test'.time()); |
|
109 | 109 | $this->documentManager->persist($newNode); |
110 | 110 | $this->documentManager->flush($newNode); |
111 | 111 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->changeNodeStatusWithRouteRedirectionTest($newNode->getId(), $statuses[0], 1, $routeDocumentCount + 2); |
115 | 115 | $this->changeNodeStatusWithRouteRedirectionTest($nodeId, $statuses[0], 1, $routeDocumentCount); |
116 | 116 | |
117 | - $this->client->request('DELETE', '/api/node/' . $nodeName . '/delete'); |
|
117 | + $this->client->request('DELETE', '/api/node/'.$nodeName.'/delete'); |
|
118 | 118 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
119 | 119 | |
120 | 120 | $this->assertEquals(1, count($this->redirectionRepository->findAll())); |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | */ |
132 | 132 | protected function changeNodeStatusWithRouteRedirectionTest($nodeId, StatusInterface $status, $redirectionNumber, $routeNumber) |
133 | 133 | { |
134 | - $this->client->request('POST', '/api/node/' . $nodeId . '/update', |
|
135 | - array(), array(), array(), '{"status_id": "'. $status->getId() .'"}'); |
|
134 | + $this->client->request('POST', '/api/node/'.$nodeId.'/update', |
|
135 | + array(), array(), array(), '{"status_id": "'.$status->getId().'"}'); |
|
136 | 136 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
137 | 137 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
138 | 138 | $this->assertEquals($redirectionNumber, count($this->redirectionRepository->findAll())); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | if (count($nodes) > 1) { |
134 | 134 | for ($i = 1; $i < count($nodes); $i++) { |
135 | - $this->assertGreaterThan($nodes[$i]->getVersion(), $nodes[$i-1]->getVersion()); |
|
135 | + $this->assertGreaterThan($nodes[$i]->getVersion(), $nodes[$i - 1]->getVersion()); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | $dm = static::$kernel->getContainer()->get('object_manager'); |
805 | 805 | $nodeNews = $this->repository->findOneByNodeId('fixture_page_news'); |
806 | 806 | $nodeCommunity = $this->repository->findOneByNodeId('fixture_page_community'); |
807 | - $nodeContact= $this->repository->findOneByNodeId('fixture_page_contact'); |
|
807 | + $nodeContact = $this->repository->findOneByNodeId('fixture_page_contact'); |
|
808 | 808 | $dm->detach($nodeContact); |
809 | 809 | $dm->detach($nodeCommunity); |
810 | 810 | $dm->detach($nodeNews); |
@@ -183,7 +183,7 @@ |
||
183 | 183 | */ |
184 | 184 | public function testFindByIncludedUsernameWithoutGroup($username, $groupName, $countUser) |
185 | 185 | { |
186 | - $group = static::$kernel->getContainer()->get('open_orchestra_user.repository.group')->findOneByName($groupName); |
|
186 | + $group = static::$kernel->getContainer()->get('open_orchestra_user.repository.group')->findOneByName($groupName); |
|
187 | 187 | $users = $this->repository->findByIncludedUsernameWithoutGroup($username, $group); |
188 | 188 | |
189 | 189 | $this->assertCount($countUser, $users); |
@@ -19,8 +19,8 @@ |
||
19 | 19 | */ |
20 | 20 | public function testApi($url, $getParameter = '', $method = 'GET') |
21 | 21 | { |
22 | - $baseGetParameter = '?access_token=' . $this->getAccessToken(); |
|
23 | - $this->client->request($method, $url . $baseGetParameter . $getParameter); |
|
22 | + $baseGetParameter = '?access_token='.$this->getAccessToken(); |
|
23 | + $this->client->request($method, $url.$baseGetParameter.$getParameter); |
|
24 | 24 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
25 | 25 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
26 | 26 | } |
@@ -102,10 +102,10 @@ |
||
102 | 102 | */ |
103 | 103 | public function providePaginateConfiguration() |
104 | 104 | { |
105 | - $mapping = array('label' => 'labels'); |
|
106 | - $conf1 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, null); |
|
107 | - $conf2 = PaginateFinderConfiguration::generateFromVariable(null , null, null, $mapping, array('label' => 'o', 'language' => 'en')); |
|
108 | - $conf3 = PaginateFinderConfiguration::generateFromVariable(null , 2 , 4 , $mapping, array('label' => 'r', 'language' => 'en')); |
|
105 | + $mapping = array('label' => 'labels'); |
|
106 | + $conf1 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, null); |
|
107 | + $conf2 = PaginateFinderConfiguration::generateFromVariable(null, null, null, $mapping, array('label' => 'o', 'language' => 'en')); |
|
108 | + $conf3 = PaginateFinderConfiguration::generateFromVariable(null, 2, 4, $mapping, array('label' => 'r', 'language' => 'en')); |
|
109 | 109 | |
110 | 110 | return array( |
111 | 111 | 'No criteria' => array($conf1, 5, 5), |
@@ -133,4 +133,4 @@ |
||
133 | 133 | $dm->persist(clone $statusPublished); |
134 | 134 | $dm->flush(); |
135 | 135 | } |
136 | - } |
|
136 | + } |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | public function provideSiteId() |
116 | 116 | { |
117 | 117 | return array( |
118 | - 'Empty site' => array('3', 1), |
|
119 | - 'Demo site' => array('2', 2) |
|
118 | + 'Empty site' => array('3', 1), |
|
119 | + 'Demo site' => array('2', 2) |
|
120 | 120 | ); |
121 | 121 | } |
122 | 122 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $this->assertNull($this->repository->findOneByName('test')); |
175 | 175 | } |
176 | 176 | |
177 | - /** |
|
177 | + /** |
|
178 | 178 | * Test remove users |
179 | 179 | */ |
180 | 180 | public function testSoftDeleteGroupBySite() |
@@ -138,7 +138,7 @@ |
||
138 | 138 | /** |
139 | 139 | * @return array |
140 | 140 | */ |
141 | - public function provideColumnsAndSearchAndCount(){ |
|
141 | + public function provideColumnsAndSearchAndCount() { |
|
142 | 142 | |
143 | 143 | $configuration = new PaginateFinderConfiguration(); |
144 | 144 | $configuration->setPaginateConfiguration(null, 0, 100, array('label' => 'labels')); |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function testInstance($class, $interface) |
20 | 20 | { |
21 | - $fullClass = 'OpenOrchestra\ModelBundle\Document\\' . $class; |
|
22 | - $fullInterface = 'OpenOrchestra\ModelInterface\Model\\' . $interface; |
|
21 | + $fullClass = 'OpenOrchestra\ModelBundle\Document\\'.$class; |
|
22 | + $fullInterface = 'OpenOrchestra\ModelInterface\Model\\'.$interface; |
|
23 | 23 | $entity = new $fullClass(); |
24 | 24 | |
25 | 25 | $this->assertInstanceOf($fullInterface, $entity); |
@@ -31,53 +31,53 @@ discard block |
||
31 | 31 | public function providateClassInterfaceRelation() |
32 | 32 | { |
33 | 33 | return array( |
34 | - array('Node' , 'NodeInterface'), |
|
35 | - array('Node' , 'SchemeableInterface'), |
|
36 | - array('Node' , 'ReadSchemeableInterface'), |
|
37 | - array('Node' , 'VersionableInterface'), |
|
38 | - array('Node' , 'SoftDeleteableInterface'), |
|
39 | - array('Node' , 'StatusableInterface'), |
|
40 | - array('Content' , 'StatusableInterface'), |
|
41 | - array('Content' , 'SoftDeleteableInterface'), |
|
42 | - array('Content' , 'VersionableInterface'), |
|
43 | - array('Content' , 'SiteLinkableInterface'), |
|
44 | - array('ContentType' , 'SiteLinkableInterface'), |
|
45 | - array('Area' , 'AreaInterface'), |
|
46 | - array('Area' , 'ReadAreaInterface'), |
|
47 | - array('Block' , 'BlockInterface'), |
|
48 | - array('Block' , 'ReadBlockInterface'), |
|
49 | - array('Block' , 'TimestampableInterface'), |
|
50 | - array('ContentAttribute' , 'ContentAttributeInterface'), |
|
51 | - array('ContentAttribute' , 'ReadContentAttributeInterface'), |
|
52 | - array('Content' , 'ContentInterface'), |
|
53 | - array('Content' , 'ReadContentInterface'), |
|
54 | - array('ContentType' , 'ContentTypeInterface'), |
|
55 | - array('ContentType' , 'SoftDeleteableInterface'), |
|
56 | - array('ContentType' , 'FieldTypeContainerInterface'), |
|
57 | - array('ContentType' , 'VersionableInterface'), |
|
58 | - array('FieldType' , 'FieldTypeInterface'), |
|
59 | - array('FieldOption' , 'FieldOptionInterface'), |
|
60 | - array('Site' , 'SiteInterface'), |
|
61 | - array('Site' , 'SoftDeleteableInterface'), |
|
62 | - array('SiteAlias' , 'SiteAliasInterface'), |
|
63 | - array('SiteAlias' , 'SchemeableInterface'), |
|
64 | - array('SiteAlias' , 'ReadSchemeableInterface'), |
|
65 | - array('Node' , 'BlameableInterface'), |
|
66 | - array('Content' , 'BlameableInterface'), |
|
67 | - array('ContentType' , 'BlameableInterface'), |
|
68 | - array('Node' , 'TimestampableInterface'), |
|
69 | - array('Content' , 'TimestampableInterface'), |
|
70 | - array('ContentType' , 'TimestampableInterface'), |
|
71 | - array('Theme' , 'ThemeInterface'), |
|
72 | - array('Keyword' , 'KeywordInterface'), |
|
73 | - array('Content' , 'KeywordableInterface'), |
|
74 | - array('Redirection' , 'RedirectionInterface'), |
|
75 | - array('Redirection' , 'ReadRedirectionInterface'), |
|
76 | - array('TrashItem' , 'TrashItemInterface'), |
|
77 | - array('RouteDocument' , 'RouteDocumentInterface'), |
|
78 | - array('WorkflowProfile' , 'WorkflowProfileInterface'), |
|
34 | + array('Node', 'NodeInterface'), |
|
35 | + array('Node', 'SchemeableInterface'), |
|
36 | + array('Node', 'ReadSchemeableInterface'), |
|
37 | + array('Node', 'VersionableInterface'), |
|
38 | + array('Node', 'SoftDeleteableInterface'), |
|
39 | + array('Node', 'StatusableInterface'), |
|
40 | + array('Content', 'StatusableInterface'), |
|
41 | + array('Content', 'SoftDeleteableInterface'), |
|
42 | + array('Content', 'VersionableInterface'), |
|
43 | + array('Content', 'SiteLinkableInterface'), |
|
44 | + array('ContentType', 'SiteLinkableInterface'), |
|
45 | + array('Area', 'AreaInterface'), |
|
46 | + array('Area', 'ReadAreaInterface'), |
|
47 | + array('Block', 'BlockInterface'), |
|
48 | + array('Block', 'ReadBlockInterface'), |
|
49 | + array('Block', 'TimestampableInterface'), |
|
50 | + array('ContentAttribute', 'ContentAttributeInterface'), |
|
51 | + array('ContentAttribute', 'ReadContentAttributeInterface'), |
|
52 | + array('Content', 'ContentInterface'), |
|
53 | + array('Content', 'ReadContentInterface'), |
|
54 | + array('ContentType', 'ContentTypeInterface'), |
|
55 | + array('ContentType', 'SoftDeleteableInterface'), |
|
56 | + array('ContentType', 'FieldTypeContainerInterface'), |
|
57 | + array('ContentType', 'VersionableInterface'), |
|
58 | + array('FieldType', 'FieldTypeInterface'), |
|
59 | + array('FieldOption', 'FieldOptionInterface'), |
|
60 | + array('Site', 'SiteInterface'), |
|
61 | + array('Site', 'SoftDeleteableInterface'), |
|
62 | + array('SiteAlias', 'SiteAliasInterface'), |
|
63 | + array('SiteAlias', 'SchemeableInterface'), |
|
64 | + array('SiteAlias', 'ReadSchemeableInterface'), |
|
65 | + array('Node', 'BlameableInterface'), |
|
66 | + array('Content', 'BlameableInterface'), |
|
67 | + array('ContentType', 'BlameableInterface'), |
|
68 | + array('Node', 'TimestampableInterface'), |
|
69 | + array('Content', 'TimestampableInterface'), |
|
70 | + array('ContentType', 'TimestampableInterface'), |
|
71 | + array('Theme', 'ThemeInterface'), |
|
72 | + array('Keyword', 'KeywordInterface'), |
|
73 | + array('Content', 'KeywordableInterface'), |
|
74 | + array('Redirection', 'RedirectionInterface'), |
|
75 | + array('Redirection', 'ReadRedirectionInterface'), |
|
76 | + array('TrashItem', 'TrashItemInterface'), |
|
77 | + array('RouteDocument', 'RouteDocumentInterface'), |
|
78 | + array('WorkflowProfile', 'WorkflowProfileInterface'), |
|
79 | 79 | array('WorkflowProfileCollection', 'WorkflowProfileCollectionInterface'), |
80 | - array('WorkflowTransition' , 'WorkflowTransitionInterface'), |
|
80 | + array('WorkflowTransition', 'WorkflowTransitionInterface'), |
|
81 | 81 | ); |
82 | 82 | } |
83 | 83 | } |