]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
Handle default value for new user
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / WallabagTestCase.php
index 5f092318145f4cb7a817a7f85087e228777e7480..22016d8edd7c04727c416a7bf8a9faa338693200 100644 (file)
@@ -3,10 +3,8 @@
 namespace Wallabag\CoreBundle\Tests;
 
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
-use Symfony\Component\BrowserKit\Cookie;
-use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
 
-class WallabagTestCase extends WebTestCase
+abstract class WallabagTestCase extends WebTestCase
 {
     private $client = null;
 
@@ -20,13 +18,13 @@ class WallabagTestCase extends WebTestCase
         $this->client = static::createClient();
     }
 
-    public function logIn()
+    public function logInAs($username)
     {
         $crawler = $this->client->request('GET', '/login');
         $form = $crawler->filter('button[type=submit]')->form();
         $data = array(
-            '_username' => 'admin',
-            '_password' => 'test',
+            '_username' => $username,
+            '_password' => 'mypassword',
         );
 
         $this->client->submit($form, $data);