Skip to content

Commit 764fa25

Browse files
Merge branch '3.4' into 4.3
* 3.4: Fix tests Fix deprecated phpunit annotation
1 parent 7ea5294 commit 764fa25

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

SocketStreamTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,20 @@
1616

1717
class SocketStreamTest extends TestCase
1818
{
19-
/**
20-
* @expectedException \Symfony\Component\Mailer\Exception\TransportException
21-
* @expectedExceptionMessageRegExp /Connection refused|unable to connect/
22-
*/
2319
public function testSocketErrorNoConnection()
2420
{
21+
$this->expectException('Symfony\Component\Mailer\Exception\TransportException');
22+
$this->expectExceptionMessageRegExp('/Connection refused|unable to connect/');
2523
$s = new SocketStream();
2624
$s->setTimeout(0.1);
2725
$s->setPort(9999);
2826
$s->initialize();
2927
}
3028

31-
/**
32-
* @expectedException \Symfony\Component\Mailer\Exception\TransportException
33-
* @expectedExceptionMessageRegExp /no valid certs found cafile stream|Unable to find the socket transport "ssl"/
34-
*/
3529
public function testSocketErrorBeforeConnectError()
3630
{
31+
$this->expectException('Symfony\Component\Mailer\Exception\TransportException');
32+
$this->expectExceptionMessageRegExp('/no valid certs found cafile stream|Unable to find the socket transport "ssl"/');
3733
$s = new SocketStream();
3834
$s->setStreamOptions([
3935
'ssl' => [

Tests/Transport/Smtp/Stream/SocketStreamTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,20 @@
1616

1717
class SocketStreamTest extends TestCase
1818
{
19-
/**
20-
* @expectedException \Symfony\Component\Mailer\Exception\TransportException
21-
* @expectedExceptionMessageRegExp /Connection refused|unable to connect/
22-
*/
2319
public function testSocketErrorNoConnection()
2420
{
21+
$this->expectException('Symfony\Component\Mailer\Exception\TransportException');
22+
$this->expectExceptionMessageRegExp('/Connection refused|unable to connect/');
2523
$s = new SocketStream();
2624
$s->setTimeout(0.1);
2725
$s->setPort(9999);
2826
$s->initialize();
2927
}
3028

31-
/**
32-
* @expectedException \Symfony\Component\Mailer\Exception\TransportException
33-
* @expectedExceptionMessageRegExp /no valid certs found cafile stream|Unable to find the socket transport "ssl"/
34-
*/
3529
public function testSocketErrorBeforeConnectError()
3630
{
31+
$this->expectException('Symfony\Component\Mailer\Exception\TransportException');
32+
$this->expectExceptionMessageRegExp('/no valid certs found cafile stream|Unable to find the socket transport "ssl"/');
3733
$s = new SocketStream();
3834
$s->setStreamOptions([
3935
'ssl' => [

0 commit comments

Comments
 (0)