-
Notifications
You must be signed in to change notification settings - Fork 44
Deprecate Enhanced navigation feature integration #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ajaynes-godaddy
merged 6 commits into
master
from
chore/deprecate-navigation-feature-support
Oct 1, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d5223ad
Deprecate Enhanced navigation feature integration
nmolham-godaddy 4af7247
Always return false if WC >= 9.3
nmolham-godaddy f5c05db
Always return false if WC >= 9.3
nmolham-godaddy 066a4fc
Unit test SV_WC_Helper::is_wc_navigation_enabled method
nmolham-godaddy 240797c
Update woocommerce/class-sv-wc-helper.php
nmolham-godaddy abb938a
Update woocommerce/class-sv-wc-helper.php
nmolham-godaddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace SkyVerge\WooCommerce\PluginFramework\v5_14_0\Tests\Unit; | ||
|
||
use ReflectionException; | ||
use SkyVerge\WooCommerce\PluginFramework\v5_15_0\SV_WC_Helper; | ||
use SkyVerge\WooCommerce\PluginFramework\v5_15_0\SV_WC_Plugin_Compatibility; | ||
use SkyVerge\WooCommerce\PluginFramework\v5_15_0\Tests\TestCase; | ||
|
||
class HelperTest extends TestCase | ||
{ | ||
/** | ||
* @covers \SkyVerge\WooCommerce\PluginFramework\v5_15_0\SV_WC_Helper::is_wc_navigation_enabled() | ||
* | ||
* @throws ReflectionException | ||
*/ | ||
public function testCanDetermineIfNavigationFeaturedEnabled() : void | ||
{ | ||
$this->mockStaticMethod(SV_WC_Plugin_Compatibility::class, 'is_wc_version_gte') | ||
->once() | ||
->with('9.3') | ||
->andReturnFalse(); | ||
|
||
$this->mockStaticMethod(SV_WC_Helper::class, 'isEnhancedNavigationFeatureEnabled') | ||
->once() | ||
->andReturnTrue(); | ||
|
||
$this->mockStaticMethod(SV_WC_Helper::class, 'enhancedNavigationDeprecationNotice') | ||
->never(); | ||
|
||
$this->assertTrue(SV_WC_Helper::is_wc_navigation_enabled()); | ||
} | ||
|
||
/** | ||
* @covers \SkyVerge\WooCommerce\PluginFramework\v5_15_0\SV_WC_Helper::is_wc_navigation_enabled() | ||
* | ||
* @throws ReflectionException | ||
*/ | ||
public function testAlwaysDetermineNavigationFeaturedDisabled() : void | ||
{ | ||
$this->mockStaticMethod(SV_WC_Plugin_Compatibility::class, 'is_wc_version_gte') | ||
->once() | ||
->with('9.3') | ||
->andReturnTrue(); | ||
|
||
$this->mockStaticMethod(SV_WC_Helper::class, 'enhancedNavigationDeprecationNotice') | ||
->once(); | ||
|
||
$this->mockStaticMethod(SV_WC_Helper::class, 'isEnhancedNavigationFeatureEnabled') | ||
->never(); | ||
|
||
$this->assertFalse(SV_WC_Helper::is_wc_navigation_enabled()); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.