Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #841

Merged
merged 1 commit into from
Aug 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions tests/OfficialAccount/Broadcasting/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function testSendText()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Text && $message->content == 'hello world!';
return $message instanceof Text && $message->content === 'hello world!';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendText('hello world!', 'overtrue'));
}
Expand All @@ -96,7 +96,7 @@ public function testSendNews()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'mpnews' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'mpnews' && $message->media_id === 'mock-media-id';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendNews('mock-media-id', 'overtrue'));
}
Expand All @@ -105,7 +105,7 @@ public function testSendVoice()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'voice' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'voice' && $message->media_id === 'mock-media-id';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendVoice('mock-media-id', 'overtrue'));
}
Expand All @@ -114,7 +114,7 @@ public function testSendVideo()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'mpvideo' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'mpvideo' && $message->media_id === 'mock-media-id';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendVideo('mock-media-id', 'overtrue'));
}
Expand All @@ -123,7 +123,7 @@ public function testSendImage()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Image && $message->media_id == 'mock-media-id';
return $message instanceof Image && $message->media_id === 'mock-media-id';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendImage('mock-media-id', 'overtrue'));
}
Expand All @@ -132,7 +132,7 @@ public function testSendCard()
{
$c = $this->mockApiClient(Client::class, ['sendMessage']);
$c->expects()->sendMessage(\Mockery::on(function ($message) {
return $message instanceof Card && $message->card_id == 'mock-card-id';
return $message instanceof Card && $message->card_id === 'mock-card-id';
}), 'overtrue')->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->sendCard('mock-card-id', 'overtrue'));
}
Expand All @@ -141,7 +141,7 @@ public function testPreviewText()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Text && $message->content == 'hello world!';
return $message instanceof Text && $message->content === 'hello world!';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewText('hello world!', 'openid'));
}
Expand All @@ -150,7 +150,7 @@ public function testPreviewNews()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'mpnews' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'mpnews' && $message->media_id === 'mock-media-id';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewNews('mock-media-id', 'openid'));
}
Expand All @@ -159,7 +159,7 @@ public function testPreviewVoice()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'voice' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'voice' && $message->media_id === 'mock-media-id';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewVoice('mock-media-id', 'openid'));
}
Expand All @@ -168,7 +168,7 @@ public function testPreviewVideo()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Media && $message->getType() == 'mpvideo' && $message->media_id == 'mock-media-id';
return $message instanceof Media && $message->getType() === 'mpvideo' && $message->media_id === 'mock-media-id';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewVideo('mock-media-id', 'openid'));
}
Expand All @@ -177,7 +177,7 @@ public function testPreviewImage()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Image && $message->media_id == 'mock-media-id';
return $message instanceof Image && $message->media_id === 'mock-media-id';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewImage('mock-media-id', 'openid'));
}
Expand All @@ -186,7 +186,7 @@ public function testPreviewCard()
{
$c = $this->mockApiClient(Client::class, ['previewMessage']);
$c->expects()->previewMessage(\Mockery::on(function ($message) {
return $message instanceof Card && $message->card_id == 'mock-card-id';
return $message instanceof Card && $message->card_id === 'mock-card-id';
}), 'openid', Client::PREVIEW_BY_OPENID)->andReturn('mock-result')->once();
$this->assertSame('mock-result', $c->previewCard('mock-card-id', 'openid'));
}
Expand Down