Merge pull request #10 from vazaha-nl/test-fixes
Fixed function signature error and failing tests
This commit is contained in:
commit
396376ceb9
|
@ -51,7 +51,8 @@ class MatrixHttpApiTest extends BaseTestCase {
|
|||
*/
|
||||
protected $api;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->api = new MatrixHttpApi('http://example.com');
|
||||
}
|
||||
|
@ -374,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() {
|
||||
|
@ -390,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() {
|
||||
|
@ -554,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() {
|
||||
|
|
|
@ -26,7 +26,8 @@ class UserTest extends BaseTestCase {
|
|||
*/
|
||||
protected $room;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->client = new MatrixClient(self::HOSTNAME);
|
||||
$this->user = new User($this->client->api(), $this->userId);
|
||||
|
|
Loading…
Reference in a new issue