Skip to content
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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/examples/ export-ignore
/phpunit.xml.dist export-ignore
/tests/ export-ignore
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
"react/stream": "^1.0 || ^0.7 || ^0.6"
},
"require-dev": {
"phpunit/phpunit": "^5.0 || ^4.8",
"phpunit/phpunit": "^7.0 || ^6.0",
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3"
},
"suggest": {
"ext-zlib": "Requires ext-zlib extension"
},
"autoload": {
"psr-4": { "Clue\\React\\Zlib\\": "src/" }
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\Zlib\\": "tests/" }
}
}
7 changes: 1 addition & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="zlib React Test Suite">
<directory>./tests/</directory>
Expand Down
2 changes: 2 additions & 0 deletions tests/CompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Compressor;

class CompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/DecompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Decompressor;

class DecompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/DeflateDecompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Decompressor;

class DeflateDecompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/DelateCompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Compressor;

class DeflateCompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/FunctionalExamplesTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

class FunctionalExamplesTest extends TestCase
{
public function setUp()
Expand Down
2 changes: 2 additions & 0 deletions tests/GzipCompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Compressor;

class GzipCompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/GzipDecompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Decompressor;

class GzipDecompressorTest extends TestCase
Expand Down
16 changes: 3 additions & 13 deletions tests/bootstrap.php → tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

require __DIR__ . '/../vendor/autoload.php';
namespace Clue\Tests\React\Zlib;

class TestCase extends PHPUnit_Framework_TestCase
class TestCase extends \PHPUnit\Framework\TestCase
{
protected function expectCallableOnce()
{
Expand Down Expand Up @@ -37,18 +37,8 @@ protected function expectCallableNever()
return $mock;
}

/**
* @link https://github.com/reactphp/react/blob/master/tests/React/Tests/Socket/TestCase.php (taken from reactphp/react)
*/
protected function createCallableMock()
{
return $this->getMockBuilder('CallableStub')->getMock();
}
}

class CallableStub
{
public function __invoke()
{
return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock();
}
}
2 changes: 2 additions & 0 deletions tests/TransformStreamTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\TransformStream;
use React\Stream\ThroughStream;

Expand Down
2 changes: 2 additions & 0 deletions tests/ZlibCompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Compressor;

class ZlibCompressorTest extends TestCase
Expand Down
2 changes: 2 additions & 0 deletions tests/ZlibDecompressorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Zlib;

use Clue\React\Zlib\Decompressor;

class ZlibDecompressorTest extends TestCase
Expand Down