Skip to content
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

Update wp-browser to v3.5 #2064

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update wp-browser to v3.5 #2064

wants to merge 4 commits into from

Conversation

lucatume
Copy link
Contributor

@lucatume lucatume commented Mar 29, 2024

Part of Innovation Day work.

This PR updates wp-browser to version 3.5 and, along with it, Codeception to version 4 and PHPUnit to version 9.6.

I've updated the test suite configurations (not really required, but it slims them down) and update the tests to use the correct PHPUnit assertions as required.

There is an hefty number of changed files, but the changes pretty much live all in tests and the test themselves have been updated, not changed in nature.

Note: code style checks are running on the test code, and failing.

@lucatume lucatume self-assigned this Mar 29, 2024
@@ -16,7 +16,7 @@
* @package TEC\Common\Integration
*/
class Integration_AbstractTests {
public static function setUpBeforeClass() {
public static function setUpBeforeClass(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
Method name "setUpBeforeClass" in class Integration_AbstractTests is not in snake case format, try "set_up_before_class"

@@ -9,8 +9,7 @@
use Tribe__Admin__Helpers as Admin_Helpers;

class AdminHelpersTest extends \Codeception\TestCase\WPTestCase {

function setUp() {
function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Scope.MethodScope.Missing
Visibility must be declared on method "setUp"

@@ -8,7 +8,7 @@ class Body_ClassesTest extends \Codeception\TestCase\WPTestCase {

protected $class_object;

function setUp() {
function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Scope.MethodScope.Missing
Visibility must be declared on method "setUp"

@@ -179,7 +179,7 @@ public function should_correctly_identify_new_posts() {
$this->assertFalse( $sut->is_new_post( array( $post_id, $second_post_id ) ) );
}

function setUp() {
function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Scope.MethodScope.Missing
Visibility must be declared on method "setUp"

@@ -14,7 +14,7 @@ class Classic_EditorTest extends \Codeception\TestCase\WPTestCase {
*
* @since 4.15.1
*/
function setUp() {
function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Squiz.Scope.MethodScope.Missing
Visibility must be declared on method "setUp"

// before
parent::setUp();

// your set up methods here
Post_Root_Pool::reset_pool();
}

public function tearDown() {
public function tearDown(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.CodeAnalysis.UselessOverridingMethod.Found
Possible useless method overriding detected

@@ -3,14 +3,14 @@

class dateTest extends \Codeception\TestCase\WPTestCase {

public function setUp() {
public function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.CodeAnalysis.UselessOverridingMethod.Found
Possible useless method overriding detected

// before
parent::setUp();

// your set up methods here
}

public function tearDown() {
public function tearDown(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.CodeAnalysis.UselessOverridingMethod.Found
Possible useless method overriding detected

@@ -3,14 +3,14 @@

class generalTest extends \Codeception\TestCase\WPTestCase {

public function setUp() {
public function setUp(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.CodeAnalysis.UselessOverridingMethod.Found
Possible useless method overriding detected

// before
parent::setUp();

// your set up methods here
}

public function tearDown() {
public function tearDown(): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[phpcs] reported by reviewdog 🐶
Generic.CodeAnalysis.UselessOverridingMethod.Found
Possible useless method overriding detected

@lucatume lucatume marked this pull request as ready for review March 29, 2024 10:37
bordoni
bordoni previously approved these changes Mar 30, 2024
@Camwyn Camwyn changed the base branch from release/B24.dipper to master April 10, 2024 13:36
@Camwyn Camwyn dismissed bordoni’s stale review April 10, 2024 13:36

The base branch was changed.

@Camwyn Camwyn added the hold Status: on hold–do not proceed with other status items. label Apr 10, 2024
@bordoni
Copy link
Member

bordoni commented May 18, 2024

@Camwyn can we make sure this gets merged into release/T24.asag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold Status: on hold–do not proceed with other status items.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants