correct assertion to check string containment

This commit is contained in:
Lennart Hengstmengel 2021-10-07 10:27:09 +02:00
parent b29257a282
commit ba600d22bd

View file

@ -375,7 +375,7 @@ class MatrixHttpApiTest extends BaseTestCase {
$req = array_get($container, '0.request');
$this->assertEquals('GET', $req->getMethod());
$this->assertContains($this->token, $req->getRequestTarget());
$this->assertStringContainsString($this->token, $req->getRequestTarget());
}
public function testSendUserId() {
@ -391,7 +391,7 @@ class MatrixHttpApiTest extends BaseTestCase {
$req = array_get($container, '0.request');
$this->assertEquals('GET', $req->getMethod());
$this->assertContains(urlencode($this->userId), $req->getRequestTarget());
$this->assertStringContainsString(urlencode($this->userId), $req->getRequestTarget());
}
public function testSendUnsupMethod() {
@ -555,7 +555,7 @@ class MatrixHttpApiTest extends BaseTestCase {
$req = array_get($container, '0.request');
$this->assertEquals('GET', $req->getMethod());
$this->assertContains($req->getRequestTarget(), $whoamiUrl);
$this->assertStringContainsString($req->getRequestTarget(), $whoamiUrl);
}
public function testWhoamiUnauth() {