From a1691859ca0cb4c1b360c34b05aa74bdba9e582a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 18 Aug 2015 11:08:45 +0200 Subject: implement FosUser --- src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php') diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index 7a819953..3067e5a4 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php @@ -75,7 +75,7 @@ class InstallCommandTest extends WallabagCoreTestCase ->getMock(); $dialog->expects($this->any()) ->method('ask') - ->will($this->returnValue('test')); + ->will($this->returnValue('test2')); $dialog->expects($this->any()) ->method('askConfirmation') ->will($this->returnValue(true)); -- cgit v1.2.3 From af43bd37675954f937720f7b6fbcf78d85928bc5 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 11 Sep 2015 16:13:59 +0200 Subject: Fix tests Ensure that created use during install command will always be unique. We assume that the install command must be run to initialize a wallabag instance. NEVER to add more user. Also, use a better way to retrieve the real name of the database and not the one defined in parameters.yml (which isn't the same for test envi because the dbname isn't defined in parameters.yml but directly in config_test.yml) --- src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php') diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index 3067e5a4..24910e60 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php @@ -41,7 +41,7 @@ class InstallCommandTest extends WallabagCoreTestCase ->getMock(); $dialog->expects($this->any()) ->method('ask') - ->will($this->returnValue('test')); + ->will($this->returnValue('test_'.uniqid('', true))); $dialog->expects($this->any()) ->method('askConfirmation') ->will($this->returnValue(true)); @@ -75,7 +75,7 @@ class InstallCommandTest extends WallabagCoreTestCase ->getMock(); $dialog->expects($this->any()) ->method('ask') - ->will($this->returnValue('test2')); + ->will($this->returnValue('test_'.uniqid('', true))); $dialog->expects($this->any()) ->method('askConfirmation') ->will($this->returnValue(true)); @@ -125,7 +125,7 @@ class InstallCommandTest extends WallabagCoreTestCase ->getMock(); $dialog->expects($this->any()) ->method('ask') - ->will($this->returnValue('test')); + ->will($this->returnValue('test_'.uniqid('', true))); $dialog->expects($this->any()) ->method('askConfirmation') ->will($this->returnValue(true)); @@ -259,7 +259,7 @@ class InstallCommandTest extends WallabagCoreTestCase ->getMock(); $dialog->expects($this->any()) ->method('ask') - ->will($this->returnValue('test')); + ->will($this->returnValue('test_'.uniqid('', true))); $dialog->expects($this->any()) ->method('askConfirmation') ->will($this->returnValue(true)); -- cgit v1.2.3