We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fc9ed1 commit 7e79c91Copy full SHA for 7e79c91
1 file changed
tests/StringsTest.php
@@ -5,19 +5,25 @@
5
namespace Rowbot\URL\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
+use PHPUnit\Runner\Version;
9
use Rowbot\URL\String\Exception\RegexException;
-use Rowbot\URL\String\Exception\UConverterException;
10
use Rowbot\URL\String\Exception\UndefinedIndexException;
11
use Rowbot\URL\String\StringList;
12
use Rowbot\URL\String\Utf8String;
13
14
use function is_int;
15
+use function version_compare;
16
17
class StringsTest extends TestCase
18
{
19
public function testTranscodeUnknownEncoding(): void
20
- $this->expectWarning();
21
+ if (version_compare(Version::series(), '9', '>=')) {
22
+ $this->expectWarning();
23
+ } else {
24
+ $this->expectException(\PHPUnit\Framework\Error\Warning::class);
25
+ }
26
+
27
Utf8String::transcode('stuff', 'gallifreyan', 'utf-8');
28
}
29
0 commit comments