Skip to content

Commit

Permalink
Applied fixes from StyleCI (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed May 3, 2016
1 parent 6c76123 commit 0aa9455
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Foundation/ServiceProviders/UserServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
namespace EasyWeChat\Foundation\ServiceProviders;

use EasyWeChat\User\Group;
use EasyWeChat\User\User;
use EasyWeChat\User\Tag;
use EasyWeChat\User\User;
use Pimple\Container;
use Pimple\ServiceProviderInterface;

Expand Down
1 change: 1 addition & 0 deletions src/User/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public function batchtagUsers(array $openIds, $tagId)

return $this->parseJSON('json', [self::API_MEMBER_BATCH_TAG, $params]);
}

/**
* Untag users from a tag.
*
Expand Down
9 changes: 2 additions & 7 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@


/**
* class TestCase
* class TestCase.
*/
class TestCase extends PHPUnit_Framework_TestCase
{

/**
* Tear down the test case.
*
* @return void
*/
public function tearDown()
{
Expand All @@ -24,11 +21,9 @@ public function tearDown()

/**
* Run extra tear down code.
*
* @return void
*/
protected function finish()
{
// call more tear down methods
}
}
}
9 changes: 4 additions & 5 deletions tests/User/UserTagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function testCreate()
{
$tag = $this->getTag();


$tag->shouldReceive('parseJSON')->withArgs(['json', [Tag::API_CREATE, ['tag' => ['name' => 'overtrue']]]])->once();

$result = $tag->create('overtrue');
Expand Down Expand Up @@ -114,13 +113,13 @@ public function testBatchTagUsers()
$tag = $this->getTag();

$params = [
'openid_list' => [1,2,3],
'openid_list' => [1, 2, 3],
'tagid' => 'thetagid',
];

$tag->shouldReceive('parseJSON')->withArgs(['json', [Tag::API_MEMBER_BATCH_TAG, $params]])->once();

$result = $tag->batchTagUsers([1,2,3], 'thetagid');
$result = $tag->batchTagUsers([1, 2, 3], 'thetagid');
}

/**
Expand All @@ -131,12 +130,12 @@ public function testBatchUntagUsers()
$tag = $this->getTag();

$params = [
'openid_list' => [1,2,3],
'openid_list' => [1, 2, 3],
'tagid' => 'thetagid',
];

$tag->shouldReceive('parseJSON')->withArgs(['json', [Tag::API_MEMBER_BATCH_UNTAG, $params]])->once();

$result = $tag->batchUntagUsers([1,2,3], 'thetagid');
$result = $tag->batchUntagUsers([1, 2, 3], 'thetagid');
}
}
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

include __DIR__ .'/../vendor/autoload.php';
include __DIR__.'/../vendor/autoload.php';

include __DIR__.'/TestCase.php';
include __DIR__.'/TestCase.php';

0 comments on commit 0aa9455

Please sign in to comment.