Skip to content

Commit

Permalink
Simply pass null
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed May 22, 2024
1 parent a6af9a3 commit 7652a58
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/ComposerJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public function set_up() {

$class_wp_cli_capture_exit = new \ReflectionProperty( 'WP_CLI', 'capture_exit' );
$class_wp_cli_capture_exit->setAccessible( true );
$class_wp_cli = new \ReflectionClass( 'WP_CLI' );
$class_wp_cli->setStaticPropertyValue( 'capture_exit', true );
$class_wp_cli_capture_exit->setValue( null, true );

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

rmdir( $this->temp_dir );

Expand Down

0 comments on commit 7652a58

Please sign in to comment.