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 $api;
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp(): void
|
||||||
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->api = new MatrixHttpApi('http://example.com');
|
$this->api = new MatrixHttpApi('http://example.com');
|
||||||
}
|
}
|
||||||
|
@ -374,7 +375,7 @@ class MatrixHttpApiTest extends BaseTestCase {
|
||||||
$req = array_get($container, '0.request');
|
$req = array_get($container, '0.request');
|
||||||
|
|
||||||
$this->assertEquals('GET', $req->getMethod());
|
$this->assertEquals('GET', $req->getMethod());
|
||||||
$this->assertContains($this->token, $req->getRequestTarget());
|
$this->assertStringContainsString($this->token, $req->getRequestTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSendUserId() {
|
public function testSendUserId() {
|
||||||
|
@ -390,7 +391,7 @@ class MatrixHttpApiTest extends BaseTestCase {
|
||||||
$req = array_get($container, '0.request');
|
$req = array_get($container, '0.request');
|
||||||
|
|
||||||
$this->assertEquals('GET', $req->getMethod());
|
$this->assertEquals('GET', $req->getMethod());
|
||||||
$this->assertContains(urlencode($this->userId), $req->getRequestTarget());
|
$this->assertStringContainsString(urlencode($this->userId), $req->getRequestTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSendUnsupMethod() {
|
public function testSendUnsupMethod() {
|
||||||
|
@ -554,7 +555,7 @@ class MatrixHttpApiTest extends BaseTestCase {
|
||||||
$req = array_get($container, '0.request');
|
$req = array_get($container, '0.request');
|
||||||
|
|
||||||
$this->assertEquals('GET', $req->getMethod());
|
$this->assertEquals('GET', $req->getMethod());
|
||||||
$this->assertContains($req->getRequestTarget(), $whoamiUrl);
|
$this->assertStringContainsString($req->getRequestTarget(), $whoamiUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWhoamiUnauth() {
|
public function testWhoamiUnauth() {
|
||||||
|
|
|
@ -26,7 +26,8 @@ class UserTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
protected $room;
|
protected $room;
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp(): void
|
||||||
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->client = new MatrixClient(self::HOSTNAME);
|
$this->client = new MatrixClient(self::HOSTNAME);
|
||||||
$this->user = new User($this->client->api(), $this->userId);
|
$this->user = new User($this->client->api(), $this->userId);
|
||||||
|
|
Loading…
Reference in New Issue