mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Add disableContentUpdate import option
This commit also decouples the "import" and "update" functions inside ContentProxy. If a content array is available, it must be passed to the new importEntry method.
This commit is contained in:
parent
1c5da417e4
commit
d0e9b3d640
11 changed files with 118 additions and 60 deletions
|
@ -257,9 +257,8 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$proxy = new ContentProxy((new Graby()), $tagger, $this->getLogger(), $this->fetchingErrorMessage);
|
||||
$entry = new Entry(new User());
|
||||
$proxy->updateEntry(
|
||||
$proxy->importEntry(
|
||||
$entry,
|
||||
'http://0.0.0.0',
|
||||
[
|
||||
'html' => str_repeat('this is my content', 325),
|
||||
'title' => 'this is my title',
|
||||
|
@ -294,7 +293,6 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
$entry = new Entry(new User());
|
||||
$proxy->updateEntry(
|
||||
$entry,
|
||||
'http://0.0.0.0',
|
||||
[
|
||||
'html' => str_repeat('this is my content', 325),
|
||||
'title' => 'this is my title',
|
||||
|
@ -334,13 +332,14 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
$proxy = new ContentProxy($graby, $tagger, $this->getLogger(), $this->fetchingErrorMessage);
|
||||
|
||||
$entry = new Entry(new User());
|
||||
$proxy->updateEntry($entry, 'http://0.0.0.0', [
|
||||
$content = array(
|
||||
'html' => str_repeat('this is my content', 325),
|
||||
'title' => 'this is my title',
|
||||
'url' => 'http://1.1.1.1',
|
||||
'content_type' => 'text/html',
|
||||
'language' => 'fr',
|
||||
]);
|
||||
);
|
||||
$proxy->importEntry($entry, $content, true);
|
||||
|
||||
$this->assertCount(0, $entry->getTags());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue