Skip to content

Commit

Permalink
Tests: fix a few assertions
Browse files Browse the repository at this point in the history
These assertions should have been updated when the PHPUnit Polyfills were introduced, but they have clearly fallen through the cracks as the tests were not run against WP Multisite previously (which they soon will be, which is how this was discovered).
  • Loading branch information
jrfnl committed Mar 14, 2022
1 parent f305a1a commit ce43e40
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integration/admin/test-class-yoast-network-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ public function test_get_site_choices_output() {

$choices = $admin->get_site_choices();
$this->assertSame( $site->id, (int) key( $choices ) );
$this->assertContains( (string) $site->id, $choices[ $site->id ] );
$this->assertContains( $site->domain . $site->path, $choices[ $site->id ] );
$this->assertStringStartsWith( (string) $site->id, $choices[ $site->id ] );
$this->assertStringContainsString( $site->domain . $site->path, $choices[ $site->id ] );

$choices = $admin->get_site_choices( false, true );
$this->assertSame( $site->id, (int) key( $choices ) );
$this->assertContains( (string) $site->id, $choices[ $site->id ] );
$this->assertContains( $site->blogname, $choices[ $site->id ] );
$this->assertContains( $site->domain . $site->path, $choices[ $site->id ] );
$this->assertStringStartsWith( (string) $site->id, $choices[ $site->id ] );
$this->assertStringContainsString( $site->blogname, $choices[ $site->id ] );
$this->assertStringContainsString( $site->domain . $site->path, $choices[ $site->id ] );
}

/**
Expand Down

0 comments on commit ce43e40

Please sign in to comment.