Skip to content

Commit

Permalink
remove not needed pricing methods in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Dec 16, 2024
1 parent 9915a50 commit e233557
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 157 deletions.
102 changes: 0 additions & 102 deletions tests/Fixtures/inc/Engine/License/Upgrade/displayUpgradePopin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@
'config' => [
'license_account' => 1,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 50,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 200,
'regular' => 200,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => false,
'upgrades' => [
(object) [
Expand Down Expand Up @@ -70,23 +53,6 @@
'config' => [
'license_account' => 1,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 40,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 160,
'regular' => 200,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => true,
'upgrades' => [
(object) [
Expand Down Expand Up @@ -118,23 +84,6 @@
'config' => [
'license_account' => 2,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 50,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 200,
'regular' => 200,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => false,
'upgrades' => [
(object) [
Expand Down Expand Up @@ -164,23 +113,6 @@
'config' => [
'license_account' => 2,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 40,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 160,
'regular' => 200,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => true,
'upgrades' => [
(object) [
Expand Down Expand Up @@ -212,23 +144,6 @@
'config' => [
'license_account' => 3,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 50,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 150,
'regular' => 150,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => false,
'upgrades' => [
(object) [
Expand Down Expand Up @@ -258,23 +173,6 @@
'config' => [
'license_account' => 3,
'licence_expiration' => false,
'pricing' => [
'single' => [
'websites' => 1,
],
'plus' => [
'price' => 40,
'regular' => 50,
'websites' => 3,
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/plus/',
],
'infinite' => [
'price' => 120,
'regular' => 150,
'websites' => 'Unlimited',
'upgrade_url' => 'https://wp-rocket.me/checkout/upgrade/[email protected]/d89e18ee/infinite/',
],
],
'promo_active' => true,
'upgrades' => [
(object) [
Expand Down
55 changes: 0 additions & 55 deletions tests/Unit/inc/Engine/License/Upgrade/displayUpgradePopin.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,61 +56,6 @@ public function testShouldReturnExpected( $config, $expected ) {
->andReturn( $config['upgrades'] ?? [] );

if ( ! is_null( $expected ) ) {
$this->pricing->shouldReceive( 'get_single_websites_count' )
->atMost()
->once()
->andReturn( $config['pricing']['single']['websites'] );

$this->pricing->shouldReceive( 'get_plus_websites_count' )
->atMost()
->twice()
->andReturn( $config['pricing']['plus']['websites'] );

$this->pricing->shouldReceive( 'get_single_to_plus_price' )
->atMost()
->once()
->andReturn( $config['pricing']['plus']['price'] );

$this->pricing->shouldReceive( 'get_regular_single_to_plus_price' )
->atMost()
->once()
->andReturn( $config['pricing']['plus']['regular'] );

$this->user->shouldReceive( 'get_upgrade_plus_url' )
->atMost()
->once()
->andReturn( $config['pricing']['plus']['upgrade_url'] );

$this->pricing->shouldReceive( 'get_single_to_infinite_price' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['price'] );

$this->pricing->shouldReceive( 'get_regular_single_to_infinite_price' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['regular'] );

$this->pricing->shouldReceive( 'get_infinite_websites_count' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['websites'] );

$this->user->shouldReceive( 'get_upgrade_infinite_url' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['upgrade_url'] );

$this->pricing->shouldReceive( 'get_plus_to_infinite_price' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['price'] );

$this->pricing->shouldReceive( 'get_regular_plus_to_infinite_price' )
->atMost()
->once()
->andReturn( $config['pricing']['infinite']['regular'] );

$this->pricing->shouldReceive( 'is_promo_active' )
->andReturn( $config['promo_active'] );

Expand Down

0 comments on commit e233557

Please sign in to comment.