1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Update Firefox file

With real data, the previous looks more than a Chrome converted file.
Also, fix date conversion (hope so).
This commit is contained in:
Jeremy Benoist 2016-09-25 22:24:07 +02:00
parent 27acc6ddb8
commit 12d93e6896
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
4 changed files with 91 additions and 78 deletions

View file

@ -135,8 +135,8 @@ class FirefoxControllerTest extends WallabagCoreTestCase
$this->assertEmpty($content->getLanguage());
$createdAt = $content->getCreatedAt();
$this->assertEquals('2011', $createdAt->format('Y'));
$this->assertEquals('07', $createdAt->format('m'));
$this->assertEquals('2013', $createdAt->format('Y'));
$this->assertEquals('12', $createdAt->format('m'));
}
public function testImportWallabagWithEmptyFile()

View file

@ -61,7 +61,7 @@ class FirefoxImportTest extends \PHPUnit_Framework_TestCase
->disableOriginalConstructor()
->getMock();
$entryRepo->expects($this->exactly(4))
$entryRepo->expects($this->exactly(2))
->method('findByUrlAndUserId')
->willReturn(false);
@ -75,14 +75,14 @@ class FirefoxImportTest extends \PHPUnit_Framework_TestCase
->getMock();
$this->contentProxy
->expects($this->exactly(4))
->expects($this->exactly(2))
->method('updateEntry')
->willReturn($entry);
$res = $firefoxImport->import();
$this->assertTrue($res);
$this->assertEquals(['skipped' => 0, 'imported' => 4, 'queued' => 0], $firefoxImport->getSummary());
$this->assertEquals(['skipped' => 0, 'imported' => 2, 'queued' => 0], $firefoxImport->getSummary());
}
public function testImportAndMarkAllAsRead()
@ -94,7 +94,7 @@ class FirefoxImportTest extends \PHPUnit_Framework_TestCase
->disableOriginalConstructor()
->getMock();
$entryRepo->expects($this->exactly(4))
$entryRepo->expects($this->exactly(2))
->method('findByUrlAndUserId')
->will($this->onConsecutiveCalls(false, true));
@ -120,7 +120,7 @@ class FirefoxImportTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($res);
$this->assertEquals(['skipped' => 3, 'imported' => 1, 'queued' => 0], $firefoxImport->getSummary());
$this->assertEquals(['skipped' => 1, 'imported' => 1, 'queued' => 0], $firefoxImport->getSummary());
}
public function testImportWithRabbit()

View file

@ -1,61 +1,62 @@
{
"checksum": "ef1e30cddf64cb94c63d7835640165be",
"roots": {
"bookmark_bar": {
"children": [ {
"date_added": "13112787540531997",
"id": "7",
"name": "Terrorisme: les sombres prédictions du directeur de la DGSI",
"type": "url",
"url": "http://www.lefigaro.fr/actualite-france/2016/07/12/01016-20160712ARTFIG00016-terrorisme-les-sombres-perspectives-de-patrick-calvar-directeur-de-la-dgsi.php"
} ],
"date_added": "13112787380480144",
"date_modified": "13112787542724942",
"id": "1",
"name": "Bookmarks bar",
"type": "folder"
},
"other": {
"children": [ {
"date_added": "13112787503900822",
"id": "6",
"name": "Parser for Exported Bookmarks HTML file of Google Chrome and Mozilla in Java - Stack Overflow",
"type": "url",
"url": "http://stackoverflow.com/questions/15017163/parser-for-exported-bookmarks-html-file-of-google-chrome-and-mozilla-in-java"
}, {
"children": [ {
"date_added": "13112787564443378",
"id": "9",
"name": "Orange offre un meilleur réseau mobile que Bouygues et SFR, Free derrière - L'Express L'Expansion",
"type": "url",
"url": "http://lexpansion.lexpress.fr/high-tech/orange-offre-un-meilleur-reseau-mobile-que-bouygues-et-sfr-free-derriere_1811554.html"
} ],
"date_added": "13112787556763735",
"date_modified": "13112794390493325",
"id": "8",
"name": "test",
"type": "folder"
}, {
"date_added": "13112794390493325",
"id": "12",
"name": "JSON Formatter & Validator",
"type": "url",
"url": "https://jsonformatter.curiousconcept.com/"
} ],
"date_added": "13112787380480151",
"date_modified": "13112794393509988",
"id": "2",
"name": "Other bookmarks",
"type": "folder"
},
"synced": {
"children": [ ],
"date_added": "13112787380480155",
"date_modified": "0",
"id": "3",
"name": "Mobile bookmarks",
"type": "folder"
}
},
"version": 1
"guid": "root________",
"title": "",
"index": 0,
"dateAdded": 1388166091504000,
"lastModified": 1472897622350000,
"id": 1,
"type": "text/x-moz-place-container",
"root": "placesRoot",
"children": [
{
"guid": "toolbar_____",
"title": "Barre personnelle",
"index": 1,
"dateAdded": 1388166091504000,
"lastModified": 1472897622263000,
"id": 3,
"annos": [
{
"name": "bookmarkProperties/description",
"flags": 0,
"expires": 4,
"value": "Ajoutez des marque-pages dans ce dossier pour les voir apparaître sur votre barre personnelle"
}
],
"type": "text/x-moz-place-container",
"root": "toolbarFolder",
"children": [
{
"guid": "tard77lzbC5H",
"title": "Orange offre un meilleur réseau mobile que Bouygues et SFR, Free derrière - L'Express L'Expansion",
"index": 1,
"dateAdded": 1388166091644000,
"lastModified": 1388166091644000,
"id": 4,
"type": "text/x-moz-place",
"uri": "http://lexpansion.lexpress.fr/high-tech/orange-offre-un-meilleur-reseau-mobile-que-bouygues-et-sfr-free-derriere_1811554.html"
},
{
"guid": "E385l9vZ_LVn",
"title": "Parser for Exported Bookmarks HTML file of Google Chrome and Mozilla in Java",
"index": 1,
"dateAdded": 1388166091544000,
"lastModified": 1388166091545000,
"id": 5,
"type": "text/x-moz-place",
"uri": "http://stackoverflow.com/questions/15017163/parser-for-exported-bookmarks-html-file-of-google-chrome-and-mozilla-in-java"
}
]
},
{
"guid": "unfiled_____",
"title": "Autres marque-pages",
"index": 3,
"dateAdded": 1388166091504000,
"lastModified": 1388166091542000,
"id": 6,
"type": "text/x-moz-place-container",
"root": "unfiledBookmarksFolder"
}
]
}