Skip to content

Commit 8919116

Browse files
committed
test: fixed compatiblity with PHP 7.3
1 parent b623b2d commit 8919116

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/Utils/Arrays.grep().errors.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require __DIR__ . '/../bootstrap.php';
1515

1616
Assert::exception(function () {
1717
Arrays::grep(['a', '1', 'c'], '#*#');
18-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
18+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
1919

2020

2121
Assert::exception(function () {

tests/Utils/Strings.Regexp.errors.compilation.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ require __DIR__ . '/../bootstrap.php';
1515

1616
Assert::exception(function () {
1717
Strings::split('0123456789', '#*#');
18-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
18+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
1919

2020
Assert::exception(function () {
2121
Strings::match('0123456789', '#*#');
22-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
22+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
2323

2424
Assert::exception(function () {
2525
Strings::matchAll('0123456789', '#*#');
26-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
26+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
2727

2828
Assert::exception(function () {
2929
Strings::replace('0123456789', '#*#', 'x');
30-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
30+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
3131

3232
Assert::exception(function () {
3333
Strings::replace('0123456789', ['##', '#*#'], 'x');
34-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: ## or #*#');
34+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: ## or #*#');
3535

3636

3737
function cb()
@@ -42,8 +42,8 @@ function cb()
4242

4343
Assert::exception(function () {
4444
Strings::replace('0123456789', '#*#', Nette\Utils\Callback::closure('cb'));
45-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: #*#');
45+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: #*#');
4646

4747
Assert::exception(function () {
4848
Strings::replace('0123456789', ['##', '#*#'], Nette\Utils\Callback::closure('cb'));
49-
}, Nette\Utils\RegexpException::class, 'Compilation failed: nothing to repeat at offset 0 in pattern: ## or #*#');
49+
}, Nette\Utils\RegexpException::class, 'Compilation failed: %a% in pattern: ## or #*#');

0 commit comments

Comments
 (0)