aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-07-03 07:30:54 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-07-03 07:30:54 +0200
commit38520658addc217f127b0627ea28dcf8d6e6178c (patch)
tree71795eadcf13fda9198b8cd9a3da26d51826bbd9 /tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator
parentf808b01692a835673f328d7221ba8c212caa9b61 (diff)
downloadwallabag-38520658addc217f127b0627ea28dcf8d6e6178c.tar.gz
wallabag-38520658addc217f127b0627ea28dcf8d6e6178c.tar.zst
wallabag-38520658addc217f127b0627ea28dcf8d6e6178c.zip
Fix tests
Diffstat (limited to 'tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator')
-rw-r--r--tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
index 85036e35..5d6a29fe 100644
--- a/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
+++ b/tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
@@ -2,7 +2,6 @@
2 2
3namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator; 3namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator;
4 4
5use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfig;
6use Graby\SiteConfig\SiteConfig as GrabySiteConfig; 5use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
7use Monolog\Handler\TestHandler; 6use Monolog\Handler\TestHandler;
8use Monolog\Logger; 7use Monolog\Logger;
@@ -68,20 +67,15 @@ class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase
68 67
69 $config = $this->builder->buildForHost('www.example.com'); 68 $config = $this->builder->buildForHost('www.example.com');
70 69
71 $this->assertSame( 70 $this->assertSame('example.com', $config->getHost());
72 new SiteConfig([ 71 $this->assertSame(true, $config->requiresLogin());
73 'host' => 'example.com', 72 $this->assertSame('http://www.example.com/login', $config->getLoginUri());
74 'requiresLogin' => true, 73 $this->assertSame('login', $config->getUsernameField());
75 'loginUri' => 'http://www.example.com/login', 74 $this->assertSame('password', $config->getPasswordField());
76 'usernameField' => 'login', 75 $this->assertSame(['field' => 'value'], $config->getExtraFields());
77 'passwordField' => 'password', 76 $this->assertSame('//div[@class="need-login"]', $config->getNotLoggedInXpath());
78 'extraFields' => ['field' => 'value'], 77 $this->assertSame('foo', $config->getUsername());
79 'notLoggedInXpath' => '//div[@class="need-login"]', 78 $this->assertSame('bar', $config->getPassword());
80 'username' => 'foo',
81 'password' => 'bar',
82 ]),
83 $config
84 );
85 79
86 $records = $handler->getRecords(); 80 $records = $handler->getRecords();
87 81