Skip to content

Commit

Permalink
Fix tests + rename test class
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Jun 28, 2024
1 parent ee9131d commit 1ba414b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public function set_up() {

public function tear_down() {
delete_transient( 'wp_rocket_customer_data' );
delete_transient( 'wpr_user_information_timeout_active' );
delete_transient( 'wpr_user_information_timeout' );
remove_filter( 'pre_get_rocket_option_consumer_email', [ $this, 'set_consumer_email' ] );
remove_filter( 'pre_get_rocket_option_consumer_key', [ $this, 'set_consumer_key' ] );
remove_filter( 'pre_http_request', [ $this, 'set_response' ] );
Expand All @@ -51,6 +53,9 @@ public function testShouldReturnExpected( $config, $expected ) {
if ( true === $config['transient'] ) {
set_transient( 'wp_rocket_customer_data', $expected );
}
// Reset transients
delete_transient( 'wpr_user_information_timeout_active' );
delete_transient( 'wpr_user_information_timeout' );

$this->response = $config['response'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @group License
*/
class GetPricingData extends TestCase {
class GetUserData extends TestCase {
use ApiTrait;

protected static $api_credentials_config_file = 'license.php';
Expand Down

0 comments on commit 1ba414b

Please sign in to comment.