@@ -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 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function testApi($url, $method = 'GET') |
24 | 24 | { |
25 | - $this->client->request($method, $url . '?access_token=' . $this->getAccessToken()); |
|
25 | + $this->client->request($method, $url.'?access_token='.$this->getAccessToken()); |
|
26 | 26 | |
27 | 27 | $this->assertEquals(403, $this->client->getResponse()->getStatusCode()); |
28 | 28 | } |
@@ -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,52 +31,52 @@ 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('Keyword' , 'KeywordInterface'), |
|
72 | - array('Content' , 'KeywordableInterface'), |
|
73 | - array('Redirection' , 'RedirectionInterface'), |
|
74 | - array('Redirection' , 'ReadRedirectionInterface'), |
|
75 | - array('TrashItem' , 'TrashItemInterface'), |
|
76 | - array('RouteDocument' , 'RouteDocumentInterface'), |
|
77 | - 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('Keyword', 'KeywordInterface'), |
|
72 | + array('Content', 'KeywordableInterface'), |
|
73 | + array('Redirection', 'RedirectionInterface'), |
|
74 | + array('Redirection', 'ReadRedirectionInterface'), |
|
75 | + array('TrashItem', 'TrashItemInterface'), |
|
76 | + array('RouteDocument', 'RouteDocumentInterface'), |
|
77 | + array('WorkflowProfile', 'WorkflowProfileInterface'), |
|
78 | 78 | array('WorkflowProfileCollection', 'WorkflowProfileCollectionInterface'), |
79 | - array('WorkflowTransition' , 'WorkflowTransitionInterface'), |
|
79 | + array('WorkflowTransition', 'WorkflowTransitionInterface'), |
|
80 | 80 | ); |
81 | 81 | } |
82 | 82 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | if (count($nodes) > 1) { |
129 | 129 | for ($i = 1; $i < count($nodes); $i++) { |
130 | - $this->assertGreaterThan($nodes[$i]->getVersion(), $nodes[$i-1]->getVersion()); |
|
130 | + $this->assertGreaterThan($nodes[$i]->getVersion(), $nodes[$i - 1]->getVersion()); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 | } |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $dm = static::$kernel->getContainer()->get('object_manager'); |
711 | 711 | $nodeNews = $this->repository->findOneByNodeAndSite('fixture_page_news', '2'); |
712 | 712 | $nodeCommunity = $this->repository->findOneByNodeAndSite('fixture_page_community', '2'); |
713 | - $nodeContact= $this->repository->findOneByNodeAndSite('fixture_page_contact', '2'); |
|
713 | + $nodeContact = $this->repository->findOneByNodeAndSite('fixture_page_contact', '2'); |
|
714 | 714 | $dm->detach($nodeContact); |
715 | 715 | $dm->detach($nodeCommunity); |
716 | 716 | $dm->detach($nodeNews); |
@@ -997,7 +997,7 @@ |
||
997 | 997 | array('2', 'en', 8), |
998 | 998 | array('2', 'es', 0), |
999 | 999 | array('3', 'fr', 1), |
1000 | - ); |
|
1000 | + ); |
|
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | { |
59 | 59 | return array( |
60 | 60 | array('draft', 'toTranslate', false), |
61 | - array('draft', 'published' , true), |
|
61 | + array('draft', 'published', true), |
|
62 | 62 | ); |
63 | 63 | } |
64 | 64 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function provideLanguageAndVersionListAndSiteId() |
49 | 49 | { |
50 | 50 | return array( |
51 | - array(0,'fake_component', 'en', '2'), |
|
51 | + array(0, 'fake_component', 'en', '2'), |
|
52 | 52 | array(2, 'tiny_mce_wysiwyg', 'fr', '2'), |
53 | 53 | array(2, 'tiny_mce_wysiwyg', 'en', '2'), |
54 | 54 | array(1, 'menu', 'en', '2'), |
@@ -133,4 +133,4 @@ |
||
133 | 133 | $dm->persist(clone $statusPublished); |
134 | 134 | $dm->flush(); |
135 | 135 | } |
136 | - } |
|
136 | + } |
@@ -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), |
@@ -45,21 +45,21 @@ 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(); |
|
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 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $nodes = $this->nodeRepository->findByNodeId($nodeId); |
118 | 118 | foreach ($nodes as $node) { |
119 | 119 | $node->setStatus($autoUnpublishTo); |
120 | - } |
|
120 | + } |
|
121 | 121 | |
122 | 122 | $this->documentManager->flush(); |
123 | 123 |
@@ -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 | } |
@@ -71,15 +71,15 @@ discard block |
||
71 | 71 | |
72 | 72 | $formNode = $crawler->selectButton('Save')->form(); |
73 | 73 | |
74 | - $nodeName = 'fixturetest' . time(); |
|
74 | + $nodeName = 'fixturetest'.time(); |
|
75 | 75 | $formNode['oo_node[name]'] = $nodeName; |
76 | 76 | $formNode['oo_node[nodeTemplateSelection][nodeSource]'] = 'root'; |
77 | - $formNode['oo_node[routePattern]'] = '/page-test' .time(); |
|
77 | + $formNode['oo_node[routePattern]'] = '/page-test'.time(); |
|
78 | 78 | |
79 | 79 | $this->submitForm($formNode); |
80 | 80 | |
81 | 81 | $node = static::$kernel->getContainer()->get('open_orchestra_model.repository.node')->findOneByName($nodeName); |
82 | - $this->client->request('GET', '/api/node/show/' . $node->getNodeId() . '/' . $node->getSiteId() . '/' . $node->getLanguage() . '/' . $node->getVersion()); |
|
82 | + $this->client->request('GET', '/api/node/show/'.$node->getNodeId().'/'.$node->getSiteId().'/'.$node->getLanguage().'/'.$node->getVersion()); |
|
83 | 83 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
84 | 84 | $this->assertSame('application/json', $this->client->getResponse()->headers->get('content-type')); |
85 | 85 | $node = json_decode($this->client->getResponse()->getContent()); |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $this->changeNodeStatusWithRouteRedirectionTest($id, $statuses[2], $redirectionCount, $routeDocumentCount); |
101 | 101 | $this->changeNodeStatusWithRouteRedirectionTest($id, $statuses[1], $redirectionCount, $routeDocumentCount + 2); |
102 | 102 | |
103 | - $this->client->request('POST', '/api/node/new-version/' . $nodeId . '/fr/' . $node->version, array()); |
|
103 | + $this->client->request('POST', '/api/node/new-version/'.$nodeId.'/fr/'.$node->version, 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($nodeId, $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(); |
111 | 111 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | $this->documentManager->flush(); |
123 | 123 | |
124 | - $this->client->request('DELETE', '/api/node/delete/' . $nodeId); |
|
124 | + $this->client->request('DELETE', '/api/node/delete/'.$nodeId); |
|
125 | 125 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
126 | 126 | |
127 | 127 | $this->assertEquals(2, count($this->redirectionRepository->findAll())); |