diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-03-15 22:55:30 +0100 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-03-15 22:55:30 +0100 |
commit | 26dfce7f36d1c6f737ac241df1315a1b42b932c7 (patch) | |
tree | 570279b2f4d66a3de7f6ff7f7c865654ad04cea4 /ext/gettext | |
parent | 63802a8446691869371bb37078d55b99cae7eb95 (diff) | |
download | php-git-26dfce7f36d1c6f737ac241df1315a1b42b932c7.tar.gz |
Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/gettext')
-rw-r--r-- | ext/gettext/tests/bug66267.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_basic-enus.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_basic.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_bindtextdomain-cwd.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_bindtextdomain-path.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_dcgettext.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_dgettext.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_dngettext-plural.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_ngettext.phpt | 2 | ||||
-rw-r--r-- | ext/gettext/tests/gettext_textdomain-retval.phpt | 2 |
11 files changed, 11 insertions, 11 deletions
diff --git a/ext/gettext/tests/bug66267.phpt b/ext/gettext/tests/bug66267.phpt index 17d7d58d39..e5a2041109 100644 --- a/ext/gettext/tests/bug66267.phpt +++ b/ext/gettext/tests/bug66267.phpt @@ -30,7 +30,7 @@ foreach ($loc as $l) { putenv("LC_ALL=$l"); setlocale(LC_ALL, $l); - $path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . "66265"); + $path = realpath(__DIR__ . DIRECTORY_SEPARATOR . "66265"); bindtextdomain($domain, $path); bind_textdomain_codeset($domain, "UTF-8"); textdomain($domain); diff --git a/ext/gettext/tests/gettext_basic-enus.phpt b/ext/gettext/tests/gettext_basic-enus.phpt index aa6ede3abd..edbd31cc48 100644 --- a/ext/gettext/tests/gettext_basic-enus.phpt +++ b/ext/gettext/tests/gettext_basic-enus.phpt @@ -12,7 +12,7 @@ Gettext basic test with en_US locale that should be on nearly every system --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain ("messages", "./locale"); diff --git a/ext/gettext/tests/gettext_basic.phpt b/ext/gettext/tests/gettext_basic.phpt index 4d300835b3..26e7b7017e 100644 --- a/ext/gettext/tests/gettext_basic.phpt +++ b/ext/gettext/tests/gettext_basic.phpt @@ -12,7 +12,7 @@ Gettext basic test --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=fi_FI'); setlocale(LC_ALL, 'fi_FI'); bindtextdomain ("messages", "./locale"); diff --git a/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt b/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt index f88917f3c1..e9bc37b410 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; chdir($base_dir); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt b/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt index d8b8794e5a..83511d71e2 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("gettext")) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); bindtextdomain('', 'foobar'); --EXPECTF-- Warning: The first parameter of bindtextdomain must not be empty in %s on line %d diff --git a/ext/gettext/tests/gettext_bindtextdomain-path.phpt b/ext/gettext/tests/gettext_bindtextdomain-path.phpt index 97c9fbb39c..e69f6f9c58 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-path.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-path.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("gettext")) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(bindtextdomain('example.org', 'foobar')); --EXPECT-- bool(false) diff --git a/ext/gettext/tests/gettext_dcgettext.phpt b/ext/gettext/tests/gettext_dcgettext.phpt index fcfb5b1fbd..2510727c87 100644 --- a/ext/gettext/tests/gettext_dcgettext.phpt +++ b/ext/gettext/tests/gettext_dcgettext.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_MESSAGES=en_US.UTF-8'); setlocale(LC_MESSAGES, 'en_US.UTF-8'); putenv('LC_ALL=en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_dgettext.phpt b/ext/gettext/tests/gettext_dgettext.phpt index 8effa6e501..57a05faa48 100644 --- a/ext/gettext/tests/gettext_dgettext.phpt +++ b/ext/gettext/tests/gettext_dgettext.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_MESSAGES=en_US.UTF-8'); setlocale(LC_MESSAGES, 'en_US.UTF-8'); putenv('LC_ALL=en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_dngettext-plural.phpt b/ext/gettext/tests/gettext_dngettext-plural.phpt index 0380785bf1..50bddc9a93 100644 --- a/ext/gettext/tests/gettext_dngettext-plural.phpt +++ b/ext/gettext/tests/gettext_dngettext-plural.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain('dngettextTest', './locale'); diff --git a/ext/gettext/tests/gettext_ngettext.phpt b/ext/gettext/tests/gettext_ngettext.phpt index 16d02afe20..e9a7de7e73 100644 --- a/ext/gettext/tests/gettext_ngettext.phpt +++ b/ext/gettext/tests/gettext_ngettext.phpt @@ -11,7 +11,7 @@ Test ngettext() functionality ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain('dngettextTest', './locale'); diff --git a/ext/gettext/tests/gettext_textdomain-retval.phpt b/ext/gettext/tests/gettext_textdomain-retval.phpt index 5795556046..c5326a99df 100644 --- a/ext/gettext/tests/gettext_textdomain-retval.phpt +++ b/ext/gettext/tests/gettext_textdomain-retval.phpt @@ -12,7 +12,7 @@ Check if textdomain() returns the new domain --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain ("messages", "./locale"); echo textdomain('test'), "\n"; |