Skip to content

Commit ae6ca84

Browse files
author
Felix Arntz
committed
Make tests PHP 5.2 compatible.
1 parent 931294f commit ae6ca84

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/phpunit/test_clean_report.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ class TestCleanReport extends WP_UnitTestCase {
44
private $wpephpc;
55

66
public function setUp() {
7-
$root_dir = realpath( __DIR__ . '/../../' );
7+
$root_dir = realpath( dirname( __FILE__ ) . '/../../' );
88

9-
$this->wpephpc = new \WPEPHPCompat( $root_dir );
9+
$this->wpephpc = new WPEPHPCompat( $root_dir );
1010
}
1111

1212
public function test_clean_report_time() {

tests/phpunit/test_generate_ignored_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class TestGenerateIgnoredList extends WP_UnitTestCase {
55

66
public function setUp()
77
{
8-
$root_dir = realpath( __DIR__ . '/../../' );
8+
$root_dir = realpath( dirname( __FILE__ ) . '/../../' );
99

10-
$this->wpephpc = new \WPEPHPCompat( $root_dir );
10+
$this->wpephpc = new WPEPHPCompat( $root_dir );
1111

1212
$this->wpephpc->whitelist = array(
1313
'*/jetpack/*' => '7.0',

tests/phpunit/test_scan.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
class TestScan extends WP_UnitTestCase {
33

44
function test_scan_default_PHP_55() {
5-
$root_dir = realpath( __DIR__ . '/../../' );
5+
$root_dir = realpath( dirname( __FILE__ ) . '/../../' );
66

7-
$wpephpc = new \WPEPHPCompat( $root_dir );
7+
$wpephpc = new WPEPHPCompat( $root_dir );
88

99
$wpephpc->clean_after_scan();
1010

@@ -18,9 +18,9 @@ function test_scan_default_PHP_55() {
1818
}
1919

2020
function test_scan_default_PHP_70() {
21-
$root_dir = realpath( __DIR__ . '/../../' );
21+
$root_dir = realpath( dirname( __FILE__ ) . '/../../' );
2222

23-
$wpephpc = new \WPEPHPCompat( $root_dir );
23+
$wpephpc = new WPEPHPCompat( $root_dir );
2424

2525
$wpephpc->clean_after_scan();
2626

0 commit comments

Comments
 (0)