Use Pimple instead of Core\Registry and add Monolog for logging

This commit is contained in:
Frédéric Guillot
2014-11-14 22:44:25 -05:00
parent 1487cb2763
commit b081288188
57 changed files with 549 additions and 593 deletions

View File

@@ -10,9 +10,9 @@ class CommentTest extends Base
{
public function testCreate()
{
$c = new Comment($this->registry);
$t = new Task($this->registry);
$p = new Project($this->registry);
$c = new Comment($this->container);
$t = new Task($this->container);
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -30,9 +30,9 @@ class CommentTest extends Base
public function testGetAll()
{
$c = new Comment($this->registry);
$t = new Task($this->registry);
$p = new Project($this->registry);
$c = new Comment($this->container);
$t = new Task($this->container);
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -53,9 +53,9 @@ class CommentTest extends Base
public function testUpdate()
{
$c = new Comment($this->registry);
$t = new Task($this->registry);
$p = new Project($this->registry);
$c = new Comment($this->container);
$t = new Task($this->container);
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -69,9 +69,9 @@ class CommentTest extends Base
public function validateRemove()
{
$c = new Comment($this->registry);
$t = new Task($this->registry);
$p = new Project($this->registry);
$c = new Comment($this->container);
$t = new Task($this->container);
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'test1')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 3, 'owner_id' => 1)));
@@ -84,7 +84,7 @@ class CommentTest extends Base
public function testValidateCreation()
{
$c = new Comment($this->registry);
$c = new Comment($this->container);
$result = $c->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);
@@ -113,7 +113,7 @@ class CommentTest extends Base
public function testValidateModification()
{
$c = new Comment($this->registry);
$c = new Comment($this->container);
$result = $c->validateModification(array('id' => 1, 'comment' => 'bla'));
$this->assertTrue($result[0]);