summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/phpunit7
diff options
context:
space:
mode:
authorSergey Biryukov <sergeybiryukov@git.wordpress.org>2020-02-06 06:31:22 +0000
committerSergey Biryukov <sergeybiryukov@git.wordpress.org>2020-02-06 06:31:22 +0000
commite72fff9ceffb41d22c48febfc5f97c0cd46f5884 (patch)
tree8a772b03f8d8bedc5af29bf0170523741c5357f2 /tests/phpunit/includes/phpunit7
parentb02e49c2e8413184b0bebf4eb3078c3565e1e52e (diff)
downloadwordpress-e72fff9ceffb41d22c48febfc5f97c0cd46f5884.tar.gz
wordpress-e72fff9ceffb41d22c48febfc5f97c0cd46f5884.zip
Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`. This commit also includes: * Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls. * Replacing `include` statements for several files with `require_once`, for consistency: * `wp-admin/admin-header.php` * `wp-admin/admin-footer.php` * `wp-includes/version.php` Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb. Fixes #48082. git-svn-id: https://develop.svn.wordpress.org/trunk@47198 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'tests/phpunit/includes/phpunit7')
-rw-r--r--tests/phpunit/includes/phpunit7/testcase.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/phpunit7/testcase.php b/tests/phpunit/includes/phpunit7/testcase.php
index 9edc885e6a..84fe88fe3e 100644
--- a/tests/phpunit/includes/phpunit7/testcase.php
+++ b/tests/phpunit/includes/phpunit7/testcase.php
@@ -1,6 +1,6 @@
<?php
-require_once dirname( dirname( __FILE__ ) ) . '/abstract-testcase.php';
+require_once dirname( __DIR__ ) . '/abstract-testcase.php';
/**
* Defines a basic fixture to run multiple tests.