1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Add tagged services for import

- list services in /import
- add url to import service
- ImportBundle routing are now prefixed by /import
- optimize flush in each import (flushing each 20 contents)
- improve design of each import
- add more tests
This commit is contained in:
Jeremy Benoist 2015-12-31 11:24:46 +01:00
parent b1d05721cf
commit 7019c7cf6c
25 changed files with 394 additions and 43 deletions

View file

@ -0,0 +1,29 @@
<?php
namespace Wallabag\ImportBundle\Tests\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
class ImportControllerTest extends WallabagCoreTestCase
{
public function testLogin()
{
$client = $this->getClient();
$client->request('GET', '/import/');
$this->assertEquals(302, $client->getResponse()->getStatusCode());
$this->assertContains('login', $client->getResponse()->headers->get('location'));
}
public function testImportList()
{
$this->logInAs('admin');
$client = $this->getClient();
$crawler = $client->request('GET', '/import/');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertEquals(2, $crawler->filter('blockquote')->count());
}
}