Skip to content

Commit 56b0567

Browse files
committed
ext/gettext: Remove bool type coercions in tests
1 parent 3a3ff85 commit 56b0567

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,29 @@
22
test if bind_textdomain_codeset() returns correct value
33
--EXTENSIONS--
44
gettext
5+
--CREDITS--
6+
Florian Holzhauer [email protected]
7+
PHP Testfest Berlin 2009-05-09
58
--FILE--
69
<?php
7-
try {
8-
bind_textdomain_codeset(false,false);
9-
} catch (ValueError $e) {
10-
echo $e->getMessage() . PHP_EOL;
11-
}
12-
13-
try {
14-
bind_textdomain_codeset("", "UTF-8");
15-
} catch (ValueError $e) {
16-
echo $e->getMessage() . PHP_EOL;
17-
}
10+
try {
11+
bind_textdomain_codeset("", "UTF-8");
12+
} catch (ValueError $e) {
13+
echo $e->getMessage() . PHP_EOL;
14+
}
1815

19-
// bind_textdomain_codeset() always returns false on musl
20-
// because musl only supports UTF-8. For more information:
21-
//
22-
// * https://github.com/php/doc-en/issues/4311,
23-
// * https://github.com/php/php-src/issues/17163
24-
//
25-
$result = bind_textdomain_codeset('messages', "UTF-8");
26-
var_dump($result === false || $result === "UTF-8");
16+
// bind_textdomain_codeset() always returns false on musl
17+
// because musl only supports UTF-8. For more information:
18+
//
19+
// * https://github.com/php/doc-en/issues/4311,
20+
// * https://github.com/php/php-src/issues/17163
21+
//
22+
$result = bind_textdomain_codeset('messages', "UTF-8");
23+
var_dump($result === false || $result === "UTF-8");
2724

28-
echo "Done\n";
25+
echo "Done\n";
2926
?>
3027
--EXPECT--
3128
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty
32-
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty
3329
bool(true)
3430
Done
35-
--CREDITS--
36-
Florian Holzhauer [email protected]
37-
PHP Testfest Berlin 2009-05-09

0 commit comments

Comments
 (0)