Add automatic action to send a task by email

This commit is contained in:
Frederic Guillot
2015-06-20 10:48:47 -04:00
parent 7056d14c95
commit cb0916d10e
15 changed files with 280 additions and 40 deletions

View File

@@ -11,22 +11,6 @@ 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 = '';
@@ -103,7 +87,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;
$this->container['emailClient'] = $this->getMockBuilder('EmailClient')->setMethods(array('send'))->getMock();
}
public function tearDown()