endtoend-test-psl/tests/Psl/Fun/RethrowTest.php
2020-10-15 11:05:30 +02:00

22 lines
377 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Fun;
use Exception;
use PHPUnit\Framework\TestCase;
use Psl\Fun;
final class RethrowTest extends TestCase
{
public function testRethrow(): void
{
$exception = new Exception('foo');
$rethrow = Fun\rethrow();
$this->expectExceptionObject($exception);
$rethrow($exception);
}
}