mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Reduced amount of dead lines in tests
This commit is contained in:
@@ -14,7 +14,7 @@ class InvalidUrlExceptionTest extends TestCase
|
||||
* @test
|
||||
* @dataProvider providePrevious
|
||||
*/
|
||||
public function properlyCreatesExceptionFromUrl(?Throwable $prev)
|
||||
public function properlyCreatesExceptionFromUrl(?Throwable $prev): void
|
||||
{
|
||||
$e = InvalidUrlException::fromUrl('http://the_url.com', $prev);
|
||||
|
||||
@@ -23,11 +23,9 @@ class InvalidUrlExceptionTest extends TestCase
|
||||
$this->assertEquals($prev, $e->getPrevious());
|
||||
}
|
||||
|
||||
public function providePrevious(): array
|
||||
public function providePrevious(): iterable
|
||||
{
|
||||
return [
|
||||
[null],
|
||||
[new Exception('Previos error', 10)],
|
||||
];
|
||||
yield 'null previous' => [null];
|
||||
yield 'instance previous' => [new Exception('Previous error', 10)];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user