Skip to content

Commit 46bf42a

Browse files
committed
fix
1 parent a4e5f6b commit 46bf42a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
},
2626
"autoload": {
2727
"psr-4": {
28-
"DescomLib\\": "src"
28+
"DescomLib\\": "src/"
2929
}
3030
},
3131
"autoload-dev": {
3232
"psr-4": {
33-
"DescomLib\\Tests\\": "tests"
33+
"Tests\\": "tests/"
3434
}
3535
},
3636
"scripts": {

tests/ExampleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace DescomLib\Tests;
3+
namespace Tests;
44

55
use PHPUnit\Framework\TestCase;
66

tests/Services/NotificationManager/NotificationManagerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace DescomLib\Tests\Services\NotificationManager;
3+
namespace Tests;
44

5+
use Tests\TestCase;
56
use GuzzleHttp\Client;
67
use GuzzleHttp\HandlerStack;
7-
use DescomLib\Tests\TestCase;
88
use GuzzleHttp\Psr7\Response;
99
use GuzzleHttp\Handler\MockHandler;
1010
use DescomLib\Exceptions\PermanentException;
@@ -34,6 +34,8 @@ public function testLoggedEmail()
3434

3535
public function testLoggedEmailPermanentException()
3636
{
37+
$this->expectException(PermanentException::class);
38+
3739
$data = [];
3840

3941
$mock = new MockHandler([new Response(404, [], null)]);
@@ -44,12 +46,12 @@ public function testLoggedEmailPermanentException()
4446
$notificationManager->setClient($client);
4547

4648
$response = $notificationManager->send("logged_email", $data);
47-
48-
$this->assertEquals(get_class(PermanentException), get_class($response));
4949
}
5050

5151
public function testLoggedEmailTemporaryException()
5252
{
53+
$this->expectException(TemporaryException::class);
54+
5355
$data = [];
5456

5557
$mock = new MockHandler([new Response(503, [], null)]);
@@ -60,7 +62,5 @@ public function testLoggedEmailTemporaryException()
6062
$notificationManager->setClient($client);
6163

6264
$response = $notificationManager->send("logged_email", $data);
63-
64-
$this->assertEquals(get_class(TemporaryException), get_class($response));
6565
}
6666
}

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace DescomLib\Tests;
3+
namespace Tests;
44

55
use DescomLib\DescomLibServiceProvider;
66
use Orchestra\Testbench\TestCase as Orchestra;

0 commit comments

Comments
 (0)