summaryrefslogtreecommitdiff
path: root/tests/units/UserTest.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
commitb081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch)
tree68008e35eb129f74b9b2a49f6f6076ed02b601c6 /tests/units/UserTest.php
parent1487cb27634161ef558c367150213bc7077e4198 (diff)
Use Pimple instead of Core\Registry and add Monolog for logging
Diffstat (limited to 'tests/units/UserTest.php')
-rw-r--r--tests/units/UserTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php
index d4f9dd92..f0ef8543 100644
--- a/tests/units/UserTest.php
+++ b/tests/units/UserTest.php
@@ -20,7 +20,7 @@ class UserTest extends Base
public function testPrepare()
{
- $u = new User($this->registry);
+ $u = new User($this->container);
$input = array(
'username' => 'user1',
@@ -71,7 +71,7 @@ class UserTest extends Base
public function testCreate()
{
- $u = new User($this->registry);
+ $u = new User($this->container);
$this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto')));
$this->assertTrue($u->create(array('username' => 'titi', 'is_ldap_user' => 1)));
$this->assertFalse($u->create(array('username' => 'toto')));
@@ -103,7 +103,7 @@ class UserTest extends Base
public function testUpdate()
{
- $u = new User($this->registry);
+ $u = new User($this->container);
$this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto')));
$this->assertTrue($u->update(array('id' => 2, 'username' => 'biloute')));
@@ -118,10 +118,10 @@ class UserTest extends Base
public function testRemove()
{
- $u = new User($this->registry);
- $t = new Task($this->registry);
- $tf = new TaskFinder($this->registry);
- $p = new Project($this->registry);
+ $u = new User($this->container);
+ $t = new Task($this->container);
+ $tf = new TaskFinder($this->container);
+ $p = new Project($this->container);
$this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto')));
$this->assertEquals(1, $p->create(array('name' => 'Project #1')));