wallabag/tests/Wallabag/ImportBundle/Controller/ImportControllerTest.php

30 lines
799 B
PHP
Raw Normal View History

<?php
2016-06-01 21:27:35 +02:00
namespace Tests\Wallabag\ImportBundle\Controller;
2016-06-01 21:27:35 +02:00
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class ImportControllerTest extends WallabagCoreTestCase
{
public function testLogin()
{
$client = $this->getClient();
$client->request('GET', '/import/');
2017-07-01 09:52:38 +02:00
$this->assertSame(302, $client->getResponse()->getStatusCode());
2020-06-15 13:37:50 +02:00
$this->assertStringContainsString('login', $client->getResponse()->headers->get('location'));
}
public function testImportList()
{
$this->logInAs('admin');
$client = $this->getClient();
$crawler = $client->request('GET', '/import/');
2017-07-01 09:52:38 +02:00
$this->assertSame(200, $client->getResponse()->getStatusCode());
2021-02-08 09:57:10 +01:00
$this->assertSame(10, $crawler->filter('blockquote')->count());
}
}