summaryrefslogtreecommitdiff
path: root/tests/units/ProjectTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/ProjectTest.php')
-rw-r--r--tests/units/ProjectTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/units/ProjectTest.php b/tests/units/ProjectTest.php
index c507739b..04e0418b 100644
--- a/tests/units/ProjectTest.php
+++ b/tests/units/ProjectTest.php
@@ -13,7 +13,7 @@ class ProjectTest extends Base
{
public function testCreation()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
@@ -28,7 +28,7 @@ class ProjectTest extends Base
public function testUpdateLastModifiedDate()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$now = time();
@@ -47,8 +47,8 @@ class ProjectTest extends Base
public function testIsLastModified()
{
- $p = new Project($this->registry);
- $t = new Task($this->registry);
+ $p = new Project($this->container);
+ $t = new Task($this->container);
$now = time();
$p->attachEvents();
@@ -62,8 +62,8 @@ class ProjectTest extends Base
sleep(1);
$this->assertEquals(1, $t->create(array('title' => 'Task #1', 'project_id' => 1)));
- $this->assertTrue($this->registry->shared('event')->isEventTriggered(Task::EVENT_CREATE));
- $this->assertEquals('Event\ProjectModificationDateListener', $this->registry->shared('event')->getLastListenerExecuted());
+ $this->assertTrue($this->container['event']->isEventTriggered(Task::EVENT_CREATE));
+ $this->assertEquals('Event\ProjectModificationDateListener', $this->container['event']->getLastListenerExecuted());
$project = $p->getById(1);
$this->assertNotEmpty($project);
@@ -72,7 +72,7 @@ class ProjectTest extends Base
public function testRemove()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->remove(1));
@@ -81,7 +81,7 @@ class ProjectTest extends Base
public function testEnable()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->disable(1));
@@ -95,7 +95,7 @@ class ProjectTest extends Base
public function testDisable()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->disable(1));
@@ -110,7 +110,7 @@ class ProjectTest extends Base
public function testEnablePublicAccess()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->enablePublicAccess(1));
@@ -125,7 +125,7 @@ class ProjectTest extends Base
public function testDisablePublicAccess()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->enablePublicAccess(1));
@@ -141,7 +141,7 @@ class ProjectTest extends Base
public function testDuplicate()
{
- $p = new Project($this->registry);
+ $p = new Project($this->container);
// Clone public project
$this->assertEquals(1, $p->create(array('name' => 'Public')));
@@ -165,7 +165,7 @@ class ProjectTest extends Base
$this->assertEquals(0, $project['is_public']);
$this->assertEmpty($project['token']);
- $pp = new ProjectPermission($this->registry);
+ $pp = new ProjectPermission($this->container);
$this->assertEquals(array(1 => 'admin'), $pp->getMembers(3));
$this->assertEquals(array(1 => 'admin'), $pp->getMembers(4));