Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Commit b527da4

Browse files
committed
phpunit depr. changes
1 parent dcba2ba commit b527da4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/RouterTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace tests;
44

5+
use Selami\Router\Exceptions\InvalidCacheFileException;
56
use Selami\Router\Exceptions\InvalidRequestMethodException;
67
use Selami\Router\Router;
78
use Zend\Diactoros\ServerRequestFactory;
@@ -108,10 +109,10 @@ public function shouldCacheRoutesSuccessfully() : void
108109
}
109110
/**
110111
* @test
111-
* @expectedException \Selami\Router\Exceptions\InvalidCacheFileException
112112
*/
113113
public function shouldThrowExceptionForInvalidCachedFile() : void
114114
{
115+
$this->expectException(InvalidCacheFileException::class);
115116
file_put_contents('/tmp/failed.cache', '');
116117
$router = Router::createWithServerRequestInterface(
117118
$this->config['default_return_type'],
@@ -173,12 +174,7 @@ public function shouldCorrectlyInstantiateRouter() : void
173174
$router->add(Router::POST, '/json', 'app/redirect', Router::REDIRECT);
174175
$router->add(Router::GET, '/alias', 'app/alias', null, 'alias');
175176
$this->assertInstanceOf(Router::class, $router);
176-
$this->assertAttributeContains(
177-
Router::GET,
178-
'method',
179-
$router,
180-
"Router didn't correctly return method as GET."
181-
);
177+
182178
}
183179

184180
/**

0 commit comments

Comments
 (0)