mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-05 19:31:02 +00:00
Remove voter & add tests
This commit is contained in:
parent
7e7674a4a6
commit
5629330cb6
29 changed files with 269 additions and 154 deletions
|
@ -91,7 +91,7 @@ class PocketHtmlControllerTest extends WallabagTestCase
|
|||
$client->getContainer()->get(Config::class)->set('import_with_redis', 0);
|
||||
}
|
||||
|
||||
public function testImportWallabagWithPocketHtmlFile()
|
||||
public function testImportPocketHtmlWithFile()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
@ -129,7 +129,7 @@ class PocketHtmlControllerTest extends WallabagTestCase
|
|||
$this->assertCount(3, $content->getTags());
|
||||
}
|
||||
|
||||
public function testImportWallabagWithEmptyFile()
|
||||
public function testImportPocketHtmlWithEmptyFile()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
@ -152,4 +152,17 @@ class PocketHtmlControllerTest extends WallabagTestCase
|
|||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertStringContainsString('flashes.import.notice.failed', $body[0]);
|
||||
}
|
||||
|
||||
public function testImportPocketHtmlDisabled()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
$client->getContainer()->get(Config::class)->set('pocket_html_enabled', 0);
|
||||
|
||||
$client->request('GET', '/import/pocket_html');
|
||||
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
|
||||
$client->getContainer()->get(Config::class)->set('pocket_html_enabled', 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue