register_legacy_proxy_function_mocks( array( 'wc_doing_it_wrong' => function ( $function_name, $message ) { // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped throw new \Exception( "Doing it wrong, function: '$function_name', message: '$message'" ); }, ) ); $this->expectExceptionMessage( "Doing it wrong, function: '{$method_name}', message: 'The Cost of Goods sold feature is disabled, thus the method called will do nothing and will return dummy data.'" ); } }