Skip to content

Commit 38b6dcb

Browse files
OskarStarknicolas-grekas
authored andcommitted
Use createMock() and use import instead of FQCN
1 parent cc25ec0 commit 38b6dcb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/Transport/Smtp/Stream/SocketStreamTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
namespace Symfony\Component\Mailer\Tests\Transport\Smtp\Stream;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Mailer\Exception\TransportException;
1516
use Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream;
1617

1718
class SocketStreamTest extends TestCase
1819
{
1920
public function testSocketErrorNoConnection()
2021
{
21-
$this->expectException(\Symfony\Component\Mailer\Exception\TransportException::class);
22+
$this->expectException(TransportException::class);
2223
$this->expectExceptionMessageMatches('/Connection refused|unable to connect/');
2324
$s = new SocketStream();
2425
$s->setTimeout(0.1);
@@ -28,7 +29,7 @@ public function testSocketErrorNoConnection()
2829

2930
public function testSocketErrorBeforeConnectError()
3031
{
31-
$this->expectException(\Symfony\Component\Mailer\Exception\TransportException::class);
32+
$this->expectException(TransportException::class);
3233
$this->expectExceptionMessageMatches('/no valid certs found cafile stream|Unable to find the socket transport "ssl"/');
3334
$s = new SocketStream();
3435
$s->setStreamOptions([

0 commit comments

Comments
 (0)