Skip to content

Commit

Permalink
fix some search tests
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Oct 24, 2024
1 parent 5a0a625 commit 301b74e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function testSearchPage() {
public function testSearchPageMP() {
$page = $this->fetch_page([ 'q' => 'Mary Smith' ]);
$this->assertStringContainsString('Mary Smith', $page);
$this->assertStringContainsString('MP, Amber Valley', $page);
$this->assertMatchesRegularExpression('/MP *for Amber Valley/', $page);
}

/**
Expand Down Expand Up @@ -169,9 +169,9 @@ public function testSearchPageMultipleCons() {
$page = $this->fetch_page([ 'q' => 'Liverpool' ]);
$this->assertStringContainsString('MPs in constituencies matching <em class="current-search-term">Liverpool</em>', $page);
$this->assertStringContainsString('Susan Brown', $page);
$this->assertStringContainsString('MP, Liverpool, Riverside', $page);
$this->assertMatchesRegularExpression('/MP *for Liverpool, Riverside/', $page);
$this->assertStringContainsString('Andrew Jones', $page);
$this->assertStringContainsString('MP, Liverpool, Walton', $page);
$this->assertMatchesRegularExpression('/MP *for Liverpool, Walton/', $page);
}

/**
Expand Down

0 comments on commit 301b74e

Please sign in to comment.