Skip to content

Commit

Permalink
Add basic test
Browse files Browse the repository at this point in the history
Signed-off-by: Johan Cwiklinski <[email protected]>
  • Loading branch information
trasher authored and weierophinney committed Jul 28, 2020
1 parent 98fd3a8 commit 4320d19
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/Storage/ImapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ public function testConnectTLS()
new Storage\Imap($this->params);
}

public function testConnectSelfSignedSSL()
{
if (! getenv('TESTS_LAMINAS_MAIL_IMAP_SSL')) {
return;
}

$this->params['ssl'] = 'SSL';
$this->params['novalidatecert'] = true;
new Storage\Imap($this->params);
}

public function testInvalidService()
{
$this->params['port'] = getenv('TESTS_LAMINAS_MAIL_IMAP_INVALID_PORT');
Expand Down
12 changes: 12 additions & 0 deletions test/Storage/Pop3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ public function testConnectTLS()
new Storage\Pop3($this->params);
}

public function testConnectSelfSignedSSL()
{
if (! getenv('TESTS_LAMINAS_MAIL_POP3_SSL')) {
return;
}

$this->params['ssl'] = 'SSL';
$this->params['novalidatecert'] = true;

new Storage\Pop3($this->params);
}

public function testInvalidService()
{
$this->params['port'] = getenv('TESTS_LAMINAS_MAIL_POP3_INVALID_PORT');
Expand Down

0 comments on commit 4320d19

Please sign in to comment.