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

Applied fixes from StyleCI #409

Merged
merged 1 commit into from
May 3, 2016
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';