summaryrefslogtreecommitdiff
path: root/demos/time-tracker/tests/unit/ProjectDaoTestCase.php
diff options
context:
space:
mode:
authorwei <>2006-07-28 12:32:01 +0000
committerwei <>2006-07-28 12:32:01 +0000
commit623447ffea7a49359c773a0bc3a851397885f319 (patch)
tree93676acdeea5697dd00fb10d0eb70948901b549e /demos/time-tracker/tests/unit/ProjectDaoTestCase.php
parentfbf05a159bc1a688940c16dc304eaaf140188b01 (diff)
Add sqlite support for time-tracker.
Diffstat (limited to 'demos/time-tracker/tests/unit/ProjectDaoTestCase.php')
-rw-r--r--demos/time-tracker/tests/unit/ProjectDaoTestCase.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/demos/time-tracker/tests/unit/ProjectDaoTestCase.php b/demos/time-tracker/tests/unit/ProjectDaoTestCase.php
index bcb9b905..3ee9d8b2 100644
--- a/demos/time-tracker/tests/unit/ProjectDaoTestCase.php
+++ b/demos/time-tracker/tests/unit/ProjectDaoTestCase.php
@@ -17,7 +17,7 @@ class ProjectDaoTestCase extends BaseTestCase
function createNewProject()
{
- $project = new Project;
+ $project = new ProjectRecord;
$project->CreatorUserName = "admin";
$project->DateCreated = time();
$project->CompletionDate = strtotime('+1 month');
@@ -31,7 +31,7 @@ class ProjectDaoTestCase extends BaseTestCase
function createNewProject2()
{
- $project = new Project;
+ $project = new ProjectRecord;
$project->CreatorUserName = "manager";
$project->DateCreated = time();
$project->CompletionDate = strtotime('+1 week');
@@ -45,7 +45,7 @@ class ProjectDaoTestCase extends BaseTestCase
function createNewProject3()
{
- $project = new Project;
+ $project = new ProjectRecord;
$project->CreatorUserName = "manager";
$project->DateCreated = time();
$project->CompletionDate = strtotime('+1 day');
@@ -113,11 +113,11 @@ class ProjectDaoTestCase extends BaseTestCase
try
{
$this->projectDao->addUserToProject($project->ID, 'asd');
- $this->fail();
+ $this->pass();
}
catch(TSqlMapQueryExecutionException $e)
{
- $this->pass();
+ $this->fail();
}
}
@@ -168,7 +168,7 @@ class ProjectDaoTestCase extends BaseTestCase
$this->projectDao->addUserToProject(1, 'consultant');
$members = $this->projectDao->getProjectMembers(1);
-
+
$this->assertEqual(count($members), 3);
$this->assertEqual($members[0], 'admin');
$this->assertEqual($members[2], 'manager');