Skip to content

Commit f42df36

Browse files
authored
Merge pull request #29 from clue-labs/tests
Update PHPUnit, clean up test suite and add .gitattributes to exclude dev files from exports
2 parents 8df04fa + 453592f commit f42df36

14 files changed

+34
-20
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.gitattributes export-ignore
2+
/.gitignore export-ignore
3+
/.travis.yml export-ignore
4+
/examples/ export-ignore
5+
/phpunit.xml.dist export-ignore
6+
/tests/ export-ignore

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
"react/stream": "^1.0 || ^0.7 || ^0.6"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^5.0 || ^4.8",
19+
"phpunit/phpunit": "^7.0 || ^6.0",
2020
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3"
2121
},
2222
"suggest": {
2323
"ext-zlib": "Requires ext-zlib extension"
2424
},
2525
"autoload": {
2626
"psr-4": { "Clue\\React\\Zlib\\": "src/" }
27+
},
28+
"autoload-dev": {
29+
"psr-4": { "Clue\\Tests\\React\\Zlib\\": "tests/" }
2730
}
2831
}

phpunit.xml.dist

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

3-
<phpunit bootstrap="tests/bootstrap.php"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
>
3+
<phpunit bootstrap="vendor/autoload.php" colors="true">
94
<testsuites>
105
<testsuite name="zlib React Test Suite">
116
<directory>./tests/</directory>

tests/CompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Compressor;
46

57
class CompressorTest extends TestCase

tests/DecompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Decompressor;
46

57
class DecompressorTest extends TestCase

tests/DeflateDecompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Decompressor;
46

57
class DeflateDecompressorTest extends TestCase

tests/DelateCompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Compressor;
46

57
class DeflateCompressorTest extends TestCase

tests/FunctionalExamplesTest.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\Zlib;
4+
35
class FunctionalExamplesTest extends TestCase
46
{
57
public function setUp()

tests/GzipCompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Compressor;
46

57
class GzipCompressorTest extends TestCase

tests/GzipDecompressorTest.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\Zlib;
4+
35
use Clue\React\Zlib\Decompressor;
46

57
class GzipDecompressorTest extends TestCase

0 commit comments

Comments
 (0)