Skip to content

Commit

Permalink
FriendshipsTest->testCreate() refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Webber Wu committed Jul 22, 2016
1 parent 7817aa6 commit 6eaa643
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/PIXNET/Pix/Friend/FriendshipsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,11 @@ public function testSearch()

public function testCreate()
{
$actual_all = self::$pixapi->friend->friendships->create('emmatest4')['data'];
self::$pixapi->friend->friendships->delete('emmatest4')['data'];

$actual = $actual_all['user_name'];

$expected = 'emmatest4';
$friendship = self::$pixapi->friend->friendships->create('emmatest4')['data'];
self::$pixapi->friend->friendships->delete('emmatest4');
self::$pixapi->friend->subscriptions->delete('emmatest4');

$this->assertEquals($expected, $actual);
$this->assertEquals('emmatest4', $friendship['user_name']);
}

/**
Expand Down

0 comments on commit 6eaa643

Please sign in to comment.