Skip to content

Commit f9d089e

Browse files
committed
Clean up test suite
1 parent 21c1ba9 commit f9d089e

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"autoload": {
1414
"psr-4": { "Clue\\React\\Utf8\\": "src/" }
1515
},
16+
"autoload-dev": {
17+
"psr-4": { "Clue\\Tests\\React\\Utf8\\": "tests/" }
18+
},
1619
"require": {
1720
"php": ">=5.3",
1821
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"

phpunit.xml.dist

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit bootstrap="tests/bootstrap.php"
4-
colors="true"
5-
>
3+
<phpunit bootstrap="vendor/autoload.php" colors="true">
64
<testsuites>
7-
<testsuite>
5+
<testsuite name="Utf8 Test Suite">
86
<directory>./tests/</directory>
97
</testsuite>
108
</testsuites>

tests/SequencerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
namespace Clue\Tests\React\Utf8;
4+
35
use Clue\React\Utf8\Sequencer;
46
use React\Stream\ThroughStream;
57

tests/bootstrap.php renamed to tests/TestCase.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?php
22

3-
require_once __DIR__ . '/../vendor/autoload.php';
3+
namespace Clue\Tests\React\Utf8;
44

5-
error_reporting(-1);
6-
7-
class TestCase extends PHPUnit\Framework\TestCase
5+
class TestCase extends \PHPUnit\Framework\TestCase
86
{
97
protected function expectCallableNever()
108
{
@@ -53,14 +51,6 @@ protected function expectCallableOnceParameter($type)
5351
*/
5452
protected function createCallableMock()
5553
{
56-
return $this->getMockBuilder('CallableStub')->getMock();
54+
return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock();
5755
}
5856
}
59-
60-
class CallableStub
61-
{
62-
public function __invoke()
63-
{
64-
}
65-
}
66-

0 commit comments

Comments
 (0)