From 38520658addc217f127b0627ea28dcf8d6e6178c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 3 Jul 2017 07:30:54 +0200 Subject: Fix tests --- .../GrabySiteConfigBuilderTest.php | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php') 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 @@ namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator; -use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfig; use Graby\SiteConfig\SiteConfig as GrabySiteConfig; use Monolog\Handler\TestHandler; use Monolog\Logger; @@ -68,20 +67,15 @@ class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase $config = $this->builder->buildForHost('www.example.com'); - $this->assertSame( - new SiteConfig([ - 'host' => 'example.com', - 'requiresLogin' => true, - 'loginUri' => 'http://www.example.com/login', - 'usernameField' => 'login', - 'passwordField' => 'password', - 'extraFields' => ['field' => 'value'], - 'notLoggedInXpath' => '//div[@class="need-login"]', - 'username' => 'foo', - 'password' => 'bar', - ]), - $config - ); + $this->assertSame('example.com', $config->getHost()); + $this->assertSame(true, $config->requiresLogin()); + $this->assertSame('http://www.example.com/login', $config->getLoginUri()); + $this->assertSame('login', $config->getUsernameField()); + $this->assertSame('password', $config->getPasswordField()); + $this->assertSame(['field' => 'value'], $config->getExtraFields()); + $this->assertSame('//div[@class="need-login"]', $config->getNotLoggedInXpath()); + $this->assertSame('foo', $config->getUsername()); + $this->assertSame('bar', $config->getPassword()); $records = $handler->getRecords(); -- cgit v1.2.3