+ 'starred' => '1',
+ 'archive' => '0',
+ ));
+
+ $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
+
+ $content = json_decode($this->client->getResponse()->getContent(), true);
+
+ $this->assertEquals($entry->getId(), $content['id']);
+ $this->assertEquals($entry->getUrl(), $content['url']);
+ $this->assertEquals('New awesome title', $content['title']);
+ $this->assertGreaterThan($nbTags, count($content['tags']));
+ $this->assertEquals(1, $content['user_id']);
+ }
+
+ public function testPatchEntryWithoutQuotes()
+ {
+ $entry = $this->client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneByUser(1);
+
+ if (!$entry) {
+ $this->markTestSkipped('No content found in db.');
+ }
+
+ // hydrate the tags relations
+ $nbTags = count($entry->getTags());
+
+ $this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', array(
+ 'title' => 'New awesome title',
+ 'tags' => 'new tag '.uniqid(),
+ 'starred' => 1,
+ 'archive' => 0,