Conifgure email settings through user interface

This commit is contained in:
Frederic Guillot
2016-06-05 14:53:46 -04:00
parent a08339059b
commit cd4c09c10a
35 changed files with 213 additions and 82 deletions

View File

@@ -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

View File

@@ -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());
}
}