diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
commit | 14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch) | |
tree | 79972d53f6091a1ddb17f64a6a05a5523f5d5168 /tests/units/Notification | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'tests/units/Notification')
-rw-r--r-- | tests/units/Notification/MailTest.php | 48 | ||||
-rw-r--r-- | tests/units/Notification/WebhookTest.php | 12 |
2 files changed, 30 insertions, 30 deletions
diff --git a/tests/units/Notification/MailTest.php b/tests/units/Notification/MailTest.php index 8d32b497..9f077ac8 100644 --- a/tests/units/Notification/MailTest.php +++ b/tests/units/Notification/MailTest.php @@ -2,14 +2,14 @@ require_once __DIR__.'/../Base.php'; -use Kanboard\Model\TaskFinder; -use Kanboard\Model\TaskCreation; -use Kanboard\Model\Subtask; -use Kanboard\Model\Comment; -use Kanboard\Model\User; -use Kanboard\Model\TaskFile; -use Kanboard\Model\Project; -use Kanboard\Model\Task; +use Kanboard\Model\TaskFinderModel; +use Kanboard\Model\TaskCreationModel; +use Kanboard\Model\SubtaskModel; +use Kanboard\Model\CommentModel; +use Kanboard\Model\UserModel; +use Kanboard\Model\TaskFileModel; +use Kanboard\Model\ProjectModel; +use Kanboard\Model\TaskModel; use Kanboard\Notification\MailNotification; use Kanboard\Subscriber\NotificationSubscriber; @@ -18,12 +18,12 @@ class MailTest extends Base public function testGetMailContent() { $en = new MailNotification($this->container); - $p = new Project($this->container); - $tf = new TaskFinder($this->container); - $tc = new TaskCreation($this->container); - $s = new Subtask($this->container); - $c = new Comment($this->container); - $f = new TaskFile($this->container); + $p = new ProjectModel($this->container); + $tf = new TaskFinderModel($this->container); + $tc = new TaskCreationModel($this->container); + $s = new SubtaskModel($this->container); + $c = new CommentModel($this->container); + $f = new TaskFileModel($this->container); $this->assertEquals(1, $p->create(array('name' => 'test'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1))); @@ -63,10 +63,10 @@ class MailTest extends Base public function testSendWithEmailAddress() { $en = new MailNotification($this->container); - $p = new Project($this->container); - $tf = new TaskFinder($this->container); - $tc = new TaskCreation($this->container); - $u = new User($this->container); + $p = new ProjectModel($this->container); + $tf = new TaskFinderModel($this->container); + $tc = new TaskCreationModel($this->container); + $u = new UserModel($this->container); $this->assertEquals(1, $p->create(array('name' => 'test'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1))); @@ -88,16 +88,16 @@ class MailTest extends Base $this->stringContains('test') ); - $en->notifyUser($u->getById(1), Task::EVENT_CREATE, array('task' => $tf->getDetails(1))); + $en->notifyUser($u->getById(1), TaskModel::EVENT_CREATE, array('task' => $tf->getDetails(1))); } public function testSendWithoutEmailAddress() { $en = new MailNotification($this->container); - $p = new Project($this->container); - $tf = new TaskFinder($this->container); - $tc = new TaskCreation($this->container); - $u = new User($this->container); + $p = new ProjectModel($this->container); + $tf = new TaskFinderModel($this->container); + $tc = new TaskCreationModel($this->container); + $u = new UserModel($this->container); $this->assertEquals(1, $p->create(array('name' => 'test'))); $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1))); @@ -112,6 +112,6 @@ class MailTest extends Base ->expects($this->never()) ->method('send'); - $en->notifyUser($u->getById(1), Task::EVENT_CREATE, array('task' => $tf->getDetails(1))); + $en->notifyUser($u->getById(1), TaskModel::EVENT_CREATE, array('task' => $tf->getDetails(1))); } } diff --git a/tests/units/Notification/WebhookTest.php b/tests/units/Notification/WebhookTest.php index 5984f303..5a9eb1c7 100644 --- a/tests/units/Notification/WebhookTest.php +++ b/tests/units/Notification/WebhookTest.php @@ -2,18 +2,18 @@ require_once __DIR__.'/../Base.php'; -use Kanboard\Model\Config; -use Kanboard\Model\TaskCreation; -use Kanboard\Model\Project; +use Kanboard\Model\ConfigModel; +use Kanboard\Model\TaskCreationModel; +use Kanboard\Model\ProjectModel; use Kanboard\Subscriber\NotificationSubscriber; class WebhookTest extends Base { public function testTaskCreation() { - $c = new Config($this->container); - $p = new Project($this->container); - $tc = new TaskCreation($this->container); + $c = new ConfigModel($this->container); + $p = new ProjectModel($this->container); + $tc = new TaskCreationModel($this->container); $this->container['dispatcher']->addSubscriber(new NotificationSubscriber($this->container)); $c->save(array('webhook_url' => 'http://localhost/?task-creation')); |