Skip to content

Commit b09a3a2

Browse files
committed
Run tests through CS fixes as well
1 parent 36c6a74 commit b09a3a2

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.php_cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ use ApiClients\Tools\TestUtilities\PhpCsFixerConfig;
44

55
return (function ()
66
{
7-
$path = __DIR__ . DIRECTORY_SEPARATOR . 'src';
7+
$path = __DIR__ . DIRECTORY_SEPARATOR;
8+
$paths = [
9+
$path . 'src',
10+
$path . 'tests',
11+
];
812

913
return PhpCsFixerConfig::create()
1014
->setFinder(
1115
PhpCsFixer\Finder::create()
12-
->in($path)
13-
->append([$path])
16+
->in($paths)
17+
->append($paths)
1418
)
1519
->setUsingCache(false)
1620
;

tests/AsyncClientTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
namespace ApiClients\Tests\Client\Pusher;
44

5-
use React\Dns\Resolver\Resolver;
6-
use function React\Promise\reject;
7-
use RuntimeException;
85
use ApiClients\Client\Pusher\AsyncClient;
96
use ApiClients\Tools\TestUtilities\TestCase;
7+
use React\Dns\Resolver\Resolver;
108
use React\EventLoop\Factory;
9+
use RuntimeException;
1110
use Rx\Observable;
1211
use Rx\Scheduler\ImmediateScheduler;
13-
use Rx\Websocket\Client;
12+
use function React\Promise\reject;
1413

1514
final class AsyncClientTest extends TestCase
1615
{
@@ -28,7 +27,8 @@ public function testConnectionError()
2827
$observable = Observable::error($error, new ImmediateScheduler());
2928
$client = new AsyncClient($observable);
3029
$client->channel('test')->subscribe(
31-
function () {},
30+
function () {
31+
},
3232
function ($e) use (&$capturedException) {
3333
$capturedException = $e;
3434
}
@@ -44,7 +44,8 @@ public function testConnectionRetry()
4444
$resolver->resolve('ws.pusherapp.com')->shouldBeCalled()->willReturn(reject($error));
4545
$client = AsyncClient::create($loop, 'abc', $resolver->reveal());
4646
$client->channel('test')->subscribe();
47-
$loop->addTimer(1, function () {});
47+
$loop->addTimer(1, function () {
48+
});
4849
$loop->run();
4950
}
5051
}

tests/EventTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@ public function eventsProvider()
5959
'foo-bar',
6060
$data,
6161
];
62-
6362
}
6463

6564
/**
66-
* @param array $input
65+
* @param array $input
6766
* @param string $event
6867
* @param string $channel
69-
* @param array $data
68+
* @param array $data
7069
*
7170
* @dataProvider eventsProvider
7271
*/

0 commit comments

Comments
 (0)