From 0fead566fae607cc03becca5181627a12644ddbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 19 Jan 2017 00:42:00 +0200 Subject: [PATCH] restore php 5.3 language level Conflicts: test/AddressTest.php --- test/AddressTest.php | 19 +++++++++++++++++++ test/Transport/SendmailTest.php | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/test/AddressTest.php b/test/AddressTest.php index 80ce5945..bc7ade1c 100644 --- a/test/AddressTest.php +++ b/test/AddressTest.php @@ -64,4 +64,23 @@ public function invalidSenderDataProvider() array("foo@bar", "\r\nevilBody"), ); } + + /** + * @dataProvider validSenderDataProvider + * @param string $email + * @param null|string $name + */ + public function testSetAddressValidAddressObject($email, $name) + { + $address = new Address($email, $name); + $this->assertInstanceOf('\Zend\Mail\Address', $address); + } + + public function validSenderDataProvider() + { + return array( + // Description => [sender address, sender name], + 'german IDN' => array('öäü@ä-umlaut.de', null), + ); + } } diff --git a/test/Transport/SendmailTest.php b/test/Transport/SendmailTest.php index 50e9e5a2..18ba07f4 100644 --- a/test/Transport/SendmailTest.php +++ b/test/Transport/SendmailTest.php @@ -138,7 +138,7 @@ public function testCodeInjectionInFromHeader() $message->addTo('hacker@localhost', 'Name of recipient'); $message->setSubject('TestSubject'); - $this->setExpectedException(RuntimeException::class); + $this->setExpectedException('Zend\Mail\Transport\Exception\RuntimeException'); $this->transport->send($message); }