wallabag/tests/Controller/Import/ImportControllerTest.php

30 lines
782 B
PHP
Raw Normal View History

<?php
2024-02-19 01:30:12 +01:00
namespace Tests\Wallabag\Controller\Import;
use Tests\Wallabag\WallabagTestCase;
class ImportControllerTest extends WallabagTestCase
{
public function testLogin()
{
$client = $this->getTestClient();
$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->getTestClient();
$crawler = $client->request('GET', '/import/');
2017-07-01 09:52:38 +02:00
$this->assertSame(200, $client->getResponse()->getStatusCode());
2023-07-26 12:49:30 +02:00
$this->assertSame(12, $crawler->filter('blockquote')->count());
}
}