mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Add tests
This commit is contained in:
parent
4c707d087b
commit
047fdc767a
3 changed files with 4 additions and 3 deletions
|
@ -36,8 +36,8 @@ class WallabagV2Import extends WallabagImport
|
||||||
return [
|
return [
|
||||||
'html' => $entry['content'],
|
'html' => $entry['content'],
|
||||||
'content_type' => $entry['mimetype'],
|
'content_type' => $entry['mimetype'],
|
||||||
'is_archived' => (int) ($entry['is_archived'] || $this->markAsRead),
|
'is_archived' => (bool) ($entry['is_archived'] || $this->markAsRead),
|
||||||
'is_starred' => (int) $entry['is_starred'],
|
'is_starred' => (bool) $entry['is_starred'],
|
||||||
] + $entry;
|
] + $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertEquals(3, count($content->getTags()));
|
$this->assertEquals(3, count($content->getTags()));
|
||||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||||
$this->assertEquals('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
|
$this->assertEquals('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
|
||||||
|
$this->assertTrue($content->isStarred(), 'Entry is starred');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testImportWallabagWithEmptyFile()
|
public function testImportWallabagWithEmptyFile()
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue