aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-05-21 18:09:38 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-08-22 20:18:27 +0200
commit9c545fe028013b30417c1a932cd6b9027bff752d (patch)
tree3de7e843c34d058355a3b3a4c090b61bca9c2078 /tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php
parentdb4d63fc1ae513335b751beb8f89e1eed61871c2 (diff)
downloadwallabag-9c545fe028013b30417c1a932cd6b9027bff752d.tar.gz
wallabag-9c545fe028013b30417c1a932cd6b9027bff752d.tar.zst
wallabag-9c545fe028013b30417c1a932cd6b9027bff752d.zip
Added name on client
- Fix typos in field name - Added migration for name field in API client table Manually cherry-picked from PR https://github.com/wallabag/wallabag/pull/2171
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php
index 79452ace..97ed0d58 100644
--- a/tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/DeveloperControllerTest.php
@@ -18,12 +18,19 @@ class DeveloperControllerTest extends WallabagCoreTestCase
18 18
19 $form = $crawler->filter('button[type=submit]')->form(); 19 $form = $crawler->filter('button[type=submit]')->form();
20 20
21 $client->submit($form); 21 $data = [
22 'client[name]' => 'My app',
23 ];
24
25 $crawler = $client->submit($form, $data);
22 26
23 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 27 $this->assertEquals(200, $client->getResponse()->getStatusCode());
24 28
25 $newNbClients = $em->getRepository('WallabagApiBundle:Client')->findAll(); 29 $newNbClients = $em->getRepository('WallabagApiBundle:Client')->findAll();
26 $this->assertGreaterThan(count($nbClients), count($newNbClients)); 30 $this->assertGreaterThan(count($nbClients), count($newNbClients));
31
32 $this->assertGreaterThan(1, $alert = $crawler->filter('.settings ul li strong')->extract(['_text']));
33 $this->assertContains('My app', $alert[0]);
27 } 34 }
28 35
29 public function testListingClient() 36 public function testListingClient()