Skip to content

Commit 7652a58

Browse files
committed
Simply pass null
1 parent a6af9a3 commit 7652a58

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/ComposerJsonTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function set_up() {
3131

3232
$class_wp_cli_capture_exit = new \ReflectionProperty( 'WP_CLI', 'capture_exit' );
3333
$class_wp_cli_capture_exit->setAccessible( true );
34-
$class_wp_cli = new \ReflectionClass( 'WP_CLI' );
35-
$class_wp_cli->setStaticPropertyValue( 'capture_exit', true );
34+
$class_wp_cli_capture_exit->setValue( null, true );
3635

3736
$this->temp_dir = Utils\get_temp_dir() . uniqid( 'wp-cli-test-package-composer-json-', true ) . '/';
3837
mkdir( $this->temp_dir );
@@ -45,8 +44,7 @@ public function tear_down() {
4544
// Restore exit exception.
4645
$class_wp_cli_capture_exit = new \ReflectionProperty( 'WP_CLI', 'capture_exit' );
4746
$class_wp_cli_capture_exit->setAccessible( true );
48-
$class_wp_cli = new \ReflectionClass( 'WP_CLI' );
49-
$class_wp_cli->setStaticPropertyValue( 'capture_exit', $this->prev_capture_exit );
47+
$class_wp_cli_capture_exit->setValue( null, $this->prev_capture_exit );
5048

5149
rmdir( $this->temp_dir );
5250

0 commit comments

Comments
 (0)