File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace UserSwitching \Tests ;
44
5+ use Codeception \Scenario ;
6+
57/**
68 * Acceptance tests for switching from a user who uses English to a user who doesn't
79 */
@@ -19,7 +21,17 @@ public function _before( \AcceptanceTester $I ): void {
1921 ] );
2022 }
2123
22- public function SwitchFromEnglishAdminToItalianAuthorAndBack ( \AcceptanceTester $ I ): void {
24+ public function SwitchFromEnglishAdminToItalianAuthorAndBack ( \AcceptanceTester $ I , Scenario $ scenario ): void {
25+ require dirname ( __DIR__ , 2 ) . '/vendor/wordpress/wordpress/wp-includes/version.php ' ;
26+
27+ /** @var string $wp_version */
28+
29+ $ I ->comment ( sprintf ( 'Running test on WordPress version %s ' , $ wp_version ) );
30+
31+ if ( version_compare ( $ wp_version , '6.2 ' , '< ' ) ) {
32+ $ scenario ->skip ( 'This test requires WordPress 6.2 or later. ' );
33+ }
34+
2335 $ I ->loginAsAdmin ();
2436 $ I ->switchToUser ( 'autore ' );
2537 $ I ->canSeeThePageInLanguage ( 'it-IT ' );
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function _before( \AcceptanceTester $I ): void {
2525 }
2626
2727 public function SwitchFromItalianAdminToEnglishAuthorAndBack ( \AcceptanceTester $ I , Scenario $ scenario ): void {
28- require_once dirname ( __DIR__ , 2 ) . '/vendor/wordpress/wordpress/wp-includes/version.php ' ;
28+ require dirname ( __DIR__ , 2 ) . '/vendor/wordpress/wordpress/wp-includes/version.php ' ;
2929
3030 /** @var string $wp_version */
3131
You can’t perform that action at this time.
0 commit comments