Skip to content

Commit 600f3ff

Browse files
committed
tests: fixed dependencies
1 parent 50ab7d5 commit 600f3ff

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/Utils/SmartObject.undeclaredMethod.phpt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Assert::exception(function () {
5454
TestClass::method();
5555
}, Nette\MemberAccessException::class, 'Call to undefined static method TestClass::method(), did you mean methodS2()?');
5656

57-
Assert::exception(function () {
58-
Nette\Utils\Image::fromBlank(1, 1)->filledElippse();
59-
}, Nette\MemberAccessException::class, 'Call to undefined method Nette\Utils\Image::filledElippse(), did you mean filledEllipse()?');
57+
if (extension_loaded('gd')) {
58+
Assert::exception(function () {
59+
Nette\Utils\Image::fromBlank(1, 1)->filledElippse();
60+
}, Nette\MemberAccessException::class, 'Call to undefined method Nette\Utils\Image::filledElippse(), did you mean filledEllipse()?');
61+
}

tests/Utils/Strings.webalize().phpt

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

1616
Assert::same('zlutoucky-kun-oooo', Strings::webalize("&\u{17D}LU\u{164}OU\u{10C}K\u{DD} K\u{16E}\u{147} \u{F6}\u{151}\u{F4}o!")); // &ŽLUŤOUČKÝ KŮŇ öőôo!
1717
Assert::same('ZLUTOUCKY-KUN-oooo', Strings::webalize("&\u{17D}LU\u{164}OU\u{10C}K\u{DD} K\u{16E}\u{147} \u{F6}\u{151}\u{F4}o!", null, false)); // &ŽLUŤOUČKÝ KŮŇ öőôo!
18-
Assert::same('1-4-!', Strings::webalize("\u{BC} !", '!'));
18+
if (class_exists('Transliterator') && \Transliterator::create('Any-Latin; Latin-ASCII')) {
19+
Assert::same('1-4-!', Strings::webalize("\u{BC} !", '!'));
20+
}
1921
Assert::same('a-b', Strings::webalize("a\u{A0}b")); // non-breaking space
2022
Assert::exception(function () {
2123
Strings::toAscii("0123456789\xFF");

0 commit comments

Comments
 (0)