Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #53 from cleentfaar/fixed-tests
Browse files Browse the repository at this point in the history
fixed tests before refactoring
  • Loading branch information
cleentfaar committed Jan 18, 2016
2 parents 8dcbdd7 + 1309b74 commit e0ff203
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 22 deletions.
29 changes: 17 additions & 12 deletions tests/src/CL/Slack/Test/Model/ModelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ protected function createFile()
protected function assertFile(array $expected, File $actual)
{
$this->assertNotEmpty($expected);

Assert::assertInstanceOf('CL\Slack\Model\File', $actual);
Assert::assertEquals($expected, [
'id' => $actual->getId(),
Expand Down Expand Up @@ -586,12 +587,14 @@ protected function createTeam()
'name' => 'My Team',
'domain' => 'example.com',
'email_domain' => 'example.com',
'image_34' => 'https:\/\/www.example.com/image34.jpg',
'image_44' => 'https:\/\/www.example.com/image44.jpg',
'image_68' => 'https:\/\/www.example.com/image68.jpg',
'image_88' => 'https:\/\/www.example.com/image88.jpg',
'image_102' => 'https:\/\/www.example.com/image102.jpg',
'image_132' => 'https:\/\/www.example.com/image132.jpg',
'icon' => [
'image_34' => 'https:\/\/www.example.com/image34.jpg',
'image_44' => 'https:\/\/www.example.com/image44.jpg',
'image_68' => 'https:\/\/www.example.com/image68.jpg',
'image_88' => 'https:\/\/www.example.com/image88.jpg',
'image_102' => 'https:\/\/www.example.com/image102.jpg',
'image_132' => 'https:\/\/www.example.com/image132.jpg',
],
];
}

Expand All @@ -606,12 +609,14 @@ protected function assertTeam(array $expected, Team $actual)
'name' => $actual->getName(),
'domain' => $actual->getDomain(),
'email_domain' => $actual->getEmailDomain(),
'image_34' => $actual->getImage34(),
'image_44' => $actual->getImage44(),
'image_68' => $actual->getImage68(),
'image_88' => $actual->getImage88(),
'image_102' => $actual->getImage102(),
'image_132' => $actual->getImage132(),
'icon' => [
'image_34' => $actual->getIcon()['image_34'],
'image_44' => $actual->getIcon()['image_44'],
'image_68' => $actual->getIcon()['image_68'],
'image_88' => $actual->getIcon()['image_88'],
'image_102' => $actual->getIcon()['image_102'],
'image_132' => $actual->getIcon()['image_132'],
],
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Travis Raup <[email protected]>
*/
class GroupsInfoPayloadResponseTest extends AbstractPayloadResponseTest
class GroupsInfoPayloadResponseTest extends AbstractPayloadResponseTestCase
{
/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/CL/Slack/Tests/Payload/GroupsInfoPayloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Travis Raup <[email protected]>
*/
class GroupsInfoPayloadTest extends AbstractPayloadTest
class GroupsInfoPayloadTest extends AbstractPayloadTestCase
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Travis Raup <[email protected]>
*/
class RtmStartPayloadResponseTest extends AbstractPayloadResponseTest
class RtmStartPayloadResponseTest extends AbstractPayloadResponseTestCase
{
/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/CL/Slack/Tests/Payload/RtmStartPayloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Travis Raup <[email protected]>
*/
class RtmStartPayloadTest extends AbstractPayloadTest
class RtmStartPayloadTest extends AbstractPayloadTestCase
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Nic Malan <[email protected]>
*/
class TeamInfoPayloadResponseTest extends AbstractPayloadResponseTest
class TeamInfoPayloadResponseTest extends AbstractPayloadResponseTestCase
{
/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/CL/Slack/Tests/Payload/TeamInfoPayloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Nic Malan <[email protected]>
*/
class TeamInfoPayloadTest extends AbstractPayloadTest
class TeamInfoPayloadTest extends AbstractPayloadTestCase
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Dries De Peuter <[email protected]>
*/
class UsersAdminInvitePayloadResponseTest extends AbstractPayloadResponseTest
class UsersAdminInvitePayloadResponseTest extends AbstractPayloadResponseTestCase
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Dries De Peuter <[email protected]>
*/
class UsersAdminInvitePayloadTest extends AbstractPayloadTest
class UsersAdminInvitePayloadTest extends AbstractPayloadTestCase
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Cas Leentfaar <[email protected]>
*/
class UsersGetPresencePayloadResponseTest extends AbstractPayloadResponseTest
class UsersGetPresencePayloadResponseTest extends AbstractPayloadResponseTestCase
{
/**
* @inheritdoc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @author Cas Leentfaar <[email protected]>
*/
class UsersGetPresencePayloadTest extends AbstractPayloadTest
class UsersGetPresencePayloadTest extends AbstractPayloadTestCase
{
/**
* @inheritdoc
Expand Down

0 comments on commit e0ff203

Please sign in to comment.