summaryrefslogtreecommitdiff
path: root/tests/units/Base.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-07 20:06:31 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-07 20:06:31 -0400
commit4f32352fe62e47ad5ea760eb00493bdc061b2407 (patch)
tree8d5f087907dd5cba196dbfc06e626b3146659e1f /tests/units/Base.php
parent9d9e3afba2054bfa23ba6f019b7c8885c2d8415e (diff)
Add user filter/condition for notifications
Diffstat (limited to 'tests/units/Base.php')
-rw-r--r--tests/units/Base.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/units/Base.php b/tests/units/Base.php
index d5fea977..a90987ab 100644
--- a/tests/units/Base.php
+++ b/tests/units/Base.php
@@ -11,6 +11,22 @@ use SimpleLogger\File;
date_default_timezone_set('UTC');
+class FakeEmailClient
+{
+ public $email;
+ public $name;
+ public $subject;
+ public $html;
+
+ public function send($email, $name, $subject, $html)
+ {
+ $this->email = $email;
+ $this->name = $name;
+ $this->subject = $subject;
+ $this->html = $html;
+ }
+}
+
class FakeHttpClient
{
private $url = '';
@@ -79,6 +95,7 @@ abstract class Base extends PHPUnit_Framework_TestCase
$this->container['logger'] = new Logger;
$this->container['logger']->setLogger(new File('/dev/null'));
$this->container['httpClient'] = new FakeHttpClient;
+ $this->container['emailClient'] = new FakeEmailClient;
}
public function tearDown()