Skip to content

Commit

Permalink
fix: update phpunit assert string contains
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-claras committed Sep 1, 2021
1 parent bb0f4fd commit ddeb825
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/HttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testGetValidUrl(EventLoop $eventLoop): void
$response = $eventLoop->wait($httpClient->sendRequest($request));

$this->assertSame(200, $response->getStatusCode());
$this->assertContains('This is a test', (string) $response->getBody());
$this->assertStringContainsString('This is a test', (string) $response->getBody());
}

/**
Expand Down Expand Up @@ -75,7 +75,7 @@ public function testGetServerErrorUrl(EventLoop $eventLoop): void
$response = $eventLoop->wait($httpClient->sendRequest($request));

$this->assertSame(500, $response->getStatusCode());
$this->assertContains('Error', (string) $response->getBody());
$this->assertStringContainsString('Error', (string) $response->getBody());
}

/**
Expand Down Expand Up @@ -112,11 +112,11 @@ public function testSynchronousRequests(EventLoop $eventLoop): void

$response = $eventLoop->wait($httpClient->sendRequest($request));
$this->assertSame(200, $response->getStatusCode());
$this->assertContains('Example Domain', (string) $response->getBody());
$this->assertStringContainsString('Example Domain', (string) $response->getBody());

$response = $eventLoop->wait($httpClient->sendRequest($request));
$this->assertSame(200, $response->getStatusCode());
$this->assertContains('Example Domain', (string) $response->getBody());
$this->assertStringContainsString('Example Domain', (string) $response->getBody());
}

/**
Expand Down

0 comments on commit ddeb825

Please sign in to comment.