]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
Use a form type for entry
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / WallabagTestCase.php
index 5f092318145f4cb7a817a7f85087e228777e7480..397945459e9e85dff8a73f4177e5ba4372da5bf8 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,12 +18,12 @@ 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',
+            '_username' => $username,
             '_password' => 'test',
         );