Skip to content

Commit

Permalink
implementing typed properties, adding getter method as workaround for p…
Browse files Browse the repository at this point in the history
  • Loading branch information
bapcltd-marv committed Apr 21, 2020
1 parent 8c45969 commit f0962b3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/unit/MailboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class MailboxTest extends TestCase
*
* @var string
*/
private $imapPath = '{imap.example.com:993/imap/ssl/novalidate-cert}INBOX';
private string $imapPath = '{imap.example.com:993/imap/ssl/novalidate-cert}INBOX';

/**
* Holds the imap username.
Expand All @@ -31,28 +31,28 @@ final class MailboxTest extends TestCase
*
* @psalm-var string
*/
private $login = 'php-imap@example.com';
private string $login = 'php-imap@example.com';

/**
* Holds the imap user password.
*
* @var string
*/
private $password = 'v3rY!53cEt&P4sSWöRd$';
private string $password = 'v3rY!53cEt&P4sSWöRd$';

/**
* Holds the relative name of the directory, where email attachments will be saved.
*
* @var string
*/
private $attachmentsDir = '.';
private string $attachmentsDir = '.';

/**
* Holds the server encoding setting.
*
* @var string
*/
private $serverEncoding = 'UTF-8';
private string $serverEncoding = 'UTF-8';

/**
* Test, that the constructor trims possible variables
Expand Down Expand Up @@ -213,6 +213,9 @@ public function testSetAndGetImapSearchOption(): void
$mailbox->setImapSearchOption(SE_FREE);
$this->assertEquals($mailbox->getImapSearchOption(), 2);

$mailbox->setImapSearchOption(SE_FREE);
$this->assertEquals($mailbox->getImapSearchOption(), 2);

$this->expectException(InvalidParameterException::class);
$mailbox->setImapSearchOption(self::ANYTHING);

Expand Down

0 comments on commit f0962b3

Please sign in to comment.