File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments