Skip to content

Commit

Permalink
Apply fixes from StyleCI (#841)
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
overtrue authored Aug 3, 2017
1 parent 530485d commit 0ee13d7
Showing 1 changed file with 12 additions and 12 deletions.
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

0 comments on commit 0ee13d7

Please sign in to comment.