]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilderTest.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / GuzzleSiteAuthenticator / GrabySiteConfigBuilderTest.php
index 980f75793b9cb1efa6d229f459225bfd951f6935..85036e35160c9b25e593068fa76c733e87dd34f5 100644 (file)
@@ -2,16 +2,15 @@
 
 namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator;
 
-use Monolog\Handler\TestHandler;
-use Monolog\Logger;
 use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfig;
 use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
-use PHPUnit_Framework_TestCase;
-use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
-use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
+use Monolog\Handler\TestHandler;
+use Monolog\Logger;
 use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
+use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
+use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
 
-class GrabySiteConfigBuilderTest extends PHPUnit_Framework_TestCase
+class GrabySiteConfigBuilderTest extends \PHPUnit_Framework_TestCase
 {
     /** @var \Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder */
     protected $builder;
@@ -25,7 +24,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 +66,13 @@ class GrabySiteConfigBuilderTest extends PHPUnit_Framework_TestCase
             $logger
         );
 
-        $config = $this->builder->buildForHost('example.com');
+        $config = $this->builder->buildForHost('www.example.com');
 
-        $this->assertEquals(
+        $this->assertSame(
             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'],