aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php')
-rw-r--r--src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php b/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
index e972c2de..3eba7193 100644
--- a/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
+++ b/src/Wallabag/AnnotationBundle/Tests/Controller/AnnotationControllerTest.php
@@ -35,13 +35,13 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
35 ->getRepository('WallabagCoreBundle:Entry') 35 ->getRepository('WallabagCoreBundle:Entry')
36 ->findOneByUsernameAndNotArchived('admin'); 36 ->findOneByUsernameAndNotArchived('admin');
37 37
38 $headers = array('CONTENT_TYPE' => 'application/json'); 38 $headers = ['CONTENT_TYPE' => 'application/json'];
39 $content = json_encode(array( 39 $content = json_encode([
40 'text' => 'my annotation', 40 'text' => 'my annotation',
41 'quote' => 'my quote', 41 'quote' => 'my quote',
42 'ranges' => array('start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31), 42 'ranges' => ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31],
43 )); 43 ]);
44 $crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', array(), array(), $headers, $content); 44 $crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', [], [], $headers, $content);
45 45
46 $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); 46 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
47 47
@@ -69,11 +69,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
69 69
70 $this->logInAs('admin'); 70 $this->logInAs('admin');
71 71
72 $headers = array('CONTENT_TYPE' => 'application/json'); 72 $headers = ['CONTENT_TYPE' => 'application/json'];
73 $content = json_encode(array( 73 $content = json_encode([
74 'text' => 'a modified annotation', 74 'text' => 'a modified annotation',
75 )); 75 ]);
76 $crawler = $this->client->request('PUT', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content); 76 $crawler = $this->client->request('PUT', 'annotations/'.$annotation->getId().'.json', [], [], $headers, $content);
77 $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); 77 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
78 78
79 $content = json_decode($this->client->getResponse()->getContent(), true); 79 $content = json_decode($this->client->getResponse()->getContent(), true);
@@ -99,11 +99,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
99 99
100 $this->logInAs('admin'); 100 $this->logInAs('admin');
101 101
102 $headers = array('CONTENT_TYPE' => 'application/json'); 102 $headers = ['CONTENT_TYPE' => 'application/json'];
103 $content = json_encode(array( 103 $content = json_encode([
104 'text' => 'a modified annotation', 104 'text' => 'a modified annotation',
105 )); 105 ]);
106 $crawler = $this->client->request('DELETE', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content); 106 $crawler = $this->client->request('DELETE', 'annotations/'.$annotation->getId().'.json', [], [], $headers, $content);
107 $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); 107 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
108 108
109 $content = json_decode($this->client->getResponse()->getContent(), true); 109 $content = json_decode($this->client->getResponse()->getContent(), true);