summaryrefslogtreecommitdiff
path: root/demos/time-tracker/tests/unit/UserDaoTestCase.php
diff options
context:
space:
mode:
authorwei <>2006-07-18 23:39:13 +0000
committerwei <>2006-07-18 23:39:13 +0000
commit2fbc53d1f5d9e0a000717642d02558453bc610a8 (patch)
tree0ab6b464cf6b319f862e075ddd442558971c5aa6 /demos/time-tracker/tests/unit/UserDaoTestCase.php
parent319df8f534520c8c926d0cdaa1f5577c7bd8a909 (diff)
Add more tests and business code for time-tracker
Diffstat (limited to 'demos/time-tracker/tests/unit/UserDaoTestCase.php')
-rw-r--r--demos/time-tracker/tests/unit/UserDaoTestCase.php14
1 files changed, 1 insertions, 13 deletions
diff --git a/demos/time-tracker/tests/unit/UserDaoTestCase.php b/demos/time-tracker/tests/unit/UserDaoTestCase.php
index d1f3c728..b05d947e 100644
--- a/demos/time-tracker/tests/unit/UserDaoTestCase.php
+++ b/demos/time-tracker/tests/unit/UserDaoTestCase.php
@@ -11,6 +11,7 @@ class UserDaoTestCase extends BaseTestCase
parent::setup();
$app = Prado::getApplication();
$this->userDao = $app->getModule('daos')->getDao('UserDao');
+ $this->flushDatabase();
}
function assertIsAdmin($user)
@@ -105,7 +106,6 @@ class UserDaoTestCase extends BaseTestCase
$check = $this->userDao->getUserByName($user->Name);
$this->assertSameUser($check, $user);
- $this->flushDatabase();
}
function testDeleteUserByName()
@@ -117,8 +117,6 @@ class UserDaoTestCase extends BaseTestCase
$users = $this->userDao->getAllUsers();
$this->assertEqual(count($users), 2);
-
- $this->flushDatabase();
}
function testAutoSignon()
@@ -131,8 +129,6 @@ class UserDaoTestCase extends BaseTestCase
$check = $this->userDao->validateSignon($token);
$this->assertIsAdmin($check);
-
- $this->flushDatabase();
}
@@ -145,8 +141,6 @@ class UserDaoTestCase extends BaseTestCase
$check = $this->userDao->validateSignon('adasd');
$this->assertNull($check);
-
- $this->flushDatabase();
}
function testAdminRoles()
@@ -169,8 +163,6 @@ class UserDaoTestCase extends BaseTestCase
$this->assertIsManagerRole($check);
$this->assertIsConsultantRole($check);
-
- $this->flushDatabase();
}
function testSetUserRoleNoNullUser()
@@ -206,8 +198,6 @@ class UserDaoTestCase extends BaseTestCase
$this->assertIsAdminRole($check);
$this->assertIsManagerRole($check);
$this->assertNotConsultantRole($check);
-
- $this->flushDatabase();
}
function testUpdateUserPassword()
@@ -223,8 +213,6 @@ class UserDaoTestCase extends BaseTestCase
$success = $this->userDao->validateUser('admin', $pass);
$this->assertTrue($success);
-
- $this->flushDatabase();
}
function testClearSignonTokens()