Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions tests/IterableCodeExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ public function set_up() {
self::$base = Utils\normalize_path( __DIR__ ) . '/data/';

$property = new \ReflectionProperty( TestIterableCodeExtractor::class, 'dir' );
$property->setAccessible( true );
if ( PHP_VERSION_ID < 80100 ) {
$property->setAccessible( true );
}
$property->setValue( null, self::$base );
$property->setAccessible( false );
if ( PHP_VERSION_ID < 80100 ) {
$property->setAccessible( false );
}
}

public function tear_down() {
Expand Down Expand Up @@ -211,7 +215,9 @@ public function test_can_include_file_in_symlinked_folder() {
protected static function get_method_as_public( $class_name, $method_name ) {
$class = new \ReflectionClass( $class_name );
$method = $class->getMethod( $method_name );
$method->setAccessible( true );
if ( PHP_VERSION_ID < 80100 ) {
$method->setAccessible( true );
}
return $method;
}

Expand Down
4 changes: 3 additions & 1 deletion tests/MakeJsonMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public function set_up() {
self::$obj = new MakeJsonCommand();
$reflection = new \ReflectionClass( get_class( self::$obj ) );
self::$build_map = $reflection->getMethod( 'build_map' );
self::$build_map->setAccessible( true );
if ( PHP_VERSION_ID < 80100 ) {
self::$build_map->setAccessible( true );
}
}

public function test_no_map() {
Expand Down