mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-30 04:51:01 +00:00
Fix testSaveIsStarredAfterPatch
This commit is contained in:
parent
981d6a47da
commit
a3b64611f8
2 changed files with 6 additions and 1 deletions
|
@ -72,6 +72,7 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface
|
||||||
'content' => 'This is my content /o/',
|
'content' => 'This is my content /o/',
|
||||||
'language' => 'fr',
|
'language' => 'fr',
|
||||||
'starred' => true,
|
'starred' => true,
|
||||||
|
'starred_at' => new \DateTime(),
|
||||||
'preview' => 'http://0.0.0.0/image.jpg',
|
'preview' => 'http://0.0.0.0/image.jpg',
|
||||||
],
|
],
|
||||||
'entry6' => [
|
'entry6' => [
|
||||||
|
@ -113,6 +114,10 @@ class EntryFixtures extends Fixture implements DependentFixtureInterface
|
||||||
$entry->setStarred($item['starred']);
|
$entry->setStarred($item['starred']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($item['starred_at'])) {
|
||||||
|
$entry->setStarredAt($item['starred_at']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($item['archived'])) {
|
if (isset($item['archived'])) {
|
||||||
$entry->setArchived($item['archived']);
|
$entry->setArchived($item['archived']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1065,7 +1065,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
||||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||||
|
|
||||||
$this->assertSame(1, $content['is_starred']);
|
$this->assertSame(1, $content['is_starred']);
|
||||||
$this->assertGreaterThanOrEqual($now->getTimestamp(), (new \DateTime($content['starred_at']))->getTimestamp());
|
$this->assertGreaterThanOrEqual((new \DateTime($content['starred_at']))->getTimestamp(), $now->getTimestamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dataForEntriesExistWithUrl()
|
public function dataForEntriesExistWithUrl()
|
||||||
|
|
Loading…
Reference in a new issue