mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Add a live test for restricted article
It is not aimed to test if we can get the full article (since we aren't using real login/password)
but mostly to test the full work (with authentication, etc.)
Do not clean fixtured to avoid SQLite to re-use id for entry tag relation 😓
This commit is contained in:
parent
fd7fde9515
commit
9de9f1e5ce
5 changed files with 81 additions and 31 deletions
|
@ -25,7 +25,7 @@ class GrabySiteConfigBuilderTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
$grabySiteConfig = new GrabySiteConfig();
|
||||
$grabySiteConfig->requires_login = true;
|
||||
$grabySiteConfig->login_uri = 'http://example.com/login';
|
||||
$grabySiteConfig->login_uri = 'http://www.example.com/login';
|
||||
$grabySiteConfig->login_username_field = 'login';
|
||||
$grabySiteConfig->login_password_field = 'password';
|
||||
$grabySiteConfig->login_extra_fields = ['field=value'];
|
||||
|
@ -67,13 +67,13 @@ class GrabySiteConfigBuilderTest extends PHPUnit_Framework_TestCase
|
|||
$logger
|
||||
);
|
||||
|
||||
$config = $this->builder->buildForHost('example.com');
|
||||
$config = $this->builder->buildForHost('www.example.com');
|
||||
|
||||
$this->assertEquals(
|
||||
new SiteConfig([
|
||||
'host' => 'example.com',
|
||||
'requiresLogin' => true,
|
||||
'loginUri' => 'http://example.com/login',
|
||||
'loginUri' => 'http://www.example.com/login',
|
||||
'usernameField' => 'login',
|
||||
'passwordField' => 'password',
|
||||
'extraFields' => ['field' => 'value'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue