diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-06-05 14:53:46 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-06-05 14:53:46 -0400 |
commit | cd4c09c10aabb133efa0ef5e0566630941178a4a (patch) | |
tree | 2f3f56617c90ce8c907f46324fa2dde26e91e79d /tests/units | |
parent | a08339059b06bcfb673b13a380b6f199abfb5983 (diff) |
Conifgure email settings through user interface
Diffstat (limited to 'tests/units')
-rw-r--r-- | tests/units/Base.php | 2 | ||||
-rw-r--r-- | tests/units/Helper/MailHelperTest.php | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/units/Base.php b/tests/units/Base.php index c7e066d1..f7bee241 100644 --- a/tests/units/Base.php +++ b/tests/units/Base.php @@ -54,7 +54,7 @@ abstract class Base extends PHPUnit_Framework_TestCase $this->container['httpClient'] = $this ->getMockBuilder('\Kanboard\Core\Http\Client') ->setConstructorArgs(array($this->container)) - ->setMethods(array('get', 'getJson', 'postJson', 'postForm')) + ->setMethods(array('get', 'getJson', 'postJson', 'postJsonAsync', 'postForm', 'postFormAsync')) ->getMock(); $this->container['emailClient'] = $this diff --git a/tests/units/Helper/MailHelperTest.php b/tests/units/Helper/MailHelperTest.php index b2d4ba6e..e871a57d 100644 --- a/tests/units/Helper/MailHelperTest.php +++ b/tests/units/Helper/MailHelperTest.php @@ -32,4 +32,15 @@ class MailHelperTest extends Base $this->assertEquals('me@here', $helper->getMailSenderAddress()); } + + public function testGetTransport() + { + $helper = new MailHelper($this->container); + $this->assertEquals(MAIL_TRANSPORT, $helper->getMailTransport()); + + $this->container['configModel']->save(array('mail_transport' => 'smtp')); + $this->container['memoryCache']->flush(); + + $this->assertEquals('smtp', $helper->getMailTransport()); + } } |