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

Remove useless tests code. #154

Merged
merged 1 commit into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions tests/Integration/Balance/BalanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class BalanceTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testReadBalance()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
2 changes: 2 additions & 0 deletions tests/Integration/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class BaseTest extends TestCase

protected function setUp()
{
parent::setUp();

$this->mockClient = $this->getMockBuilder("\MessageBird\Common\HttpClient")->setConstructorArgs(["fake.messagebird.dev"])->getMock();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Chat/ChatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class ChatTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateChatMessage()
{
$ChatMessage = new \MessageBird\Objects\Chat\Message();
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Contacts/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class ContactTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateContact()
{
$Contact = new \MessageBird\Objects\Contact();
Expand Down
7 changes: 0 additions & 7 deletions tests/Integration/Conversation/ConversationMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ class ConversationMessageTest extends BaseTest
"type": "video"
}';

protected function setUp()
{
parent::setUp();

$this->client = new Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateImage()
{
$this->mockClient
Expand Down
19 changes: 6 additions & 13 deletions tests/Integration/Conversation/ConversationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ class ConversationTest extends BaseTest
"lastUsedChannelId": "channel-id"
}';

protected function setUp()
{
parent::setUp();

$this->client = new Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testStart()
{
$this->mockClient
Expand All @@ -122,7 +115,7 @@ public function testStart()
$message->to = '31612345678';
$message->type = 'location';
$message->content = $content;

$this->client->conversations->start($message);
}

Expand All @@ -135,10 +128,10 @@ public function testCreate()
->expects($this->once())->method('performHttpRequest')
->with('POST', 'conversations', null, self::CREATE_REQUEST)
->willReturn([200, '', '{}']);

$this->client->conversations->create('some-contact-id');
}

public function testList()
{
$this->mockClient
Expand Down Expand Up @@ -178,12 +171,12 @@ public function testUpdate()
->expects($this->exactly(2))->method('performHttpRequest')
->withConsecutive(
['PATCH', 'conversations/conversation-id', null, '{"status":"archived"}'],
['PATCH', 'conversations/conversation-id', null, '{"status":"active"}']
['PATCH', 'conversations/conversation-id', null, '{"status":"active"}']
)
->willReturn([200, '', '{}']);

$conversation = new Conversation();

$conversation->status = Conversation::STATUS_ARCHIVED;
$this->client->conversations->update($conversation, 'conversation-id');

Expand Down Expand Up @@ -236,4 +229,4 @@ private function getConversation()

return $conversation;
}
}
}
7 changes: 0 additions & 7 deletions tests/Integration/Conversation/ConversationWebhookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ class ConversationWebhookTest extends BaseTest
"updatedDatetime": "2018-07-20T12:13:51+00:00"
}';

protected function setUp()
{
parent::setUp();

$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testDelete()
{
$this->mockClient
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Groups/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class GroupTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateGroup()
{
$Group = new \MessageBird\Objects\Group();
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Hlr/HlrTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class HlrTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateHlr()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Lookup/LookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class LookupTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testReadLookup()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Messages/MessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class MessageTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateMessage()
{
$Message = new \MessageBird\Objects\Message();
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Numbers/AvailablePhoneNumbersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class AvailablePhoneNumbersTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testListAvailablePhoneNumbers()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Numbers/PhoneNumbersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class PhoneNumbersTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testReadPhoneNumber()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/PartnerAccount/AccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class AccountTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testCreateSubAccount()
{
$account = new \MessageBird\Objects\PartnerAccount\Account();
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/Verify/VerifyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class VerifyTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testGenerateOtp()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
9 changes: 0 additions & 9 deletions tests/Integration/Voice/VoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@

class VoiceTest extends BaseTest
{
/** @var \MessageBird\Client client */
public $client;

protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testListVoiceCall()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/VoiceMessages/VoiceMessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

class VoiceMessagesTest extends BaseTest
{
protected function setUp()
{
parent::setUp();
$this->client = new \MessageBird\Client('YOUR_ACCESS_KEY', $this->mockClient);
}

public function testVoiceMessageCreate()
{
$this->expectException(\MessageBird\Exceptions\ServerException::class);
Expand Down