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
23 changes: 11 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
language: php

php:
# - 5.3 # requires old distro, see below
- 5.4
- 5.5
- 5.6
- 7
- 7.1
- 7.2
- hhvm # ignore errors, see below

# lock distro so future defaults will not break the build
# lock distro so new future defaults will not break the build
dist: trusty

matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: hhvm-3.18
allow_failures:
- php: hhvm
- php: hhvm-3.18

sudo: false

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
"autoload": {
"psr-4": { "Clue\\React\\Utf8\\": "src/" }
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\Utf8\\": "tests/" }
},
"require": {
"php": ">=5.3",
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"
},
"require-dev": {
"phpunit/phpunit": "^5.0 || ^4.8",
"phpunit/phpunit": "^9.0 ||^5.0 || ^4.8",
"react/stream": "^1.0 || ^0.7"
}
}
6 changes: 2 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
colors="true"
>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite>
<testsuite name="Utf8 Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
Expand Down
7 changes: 6 additions & 1 deletion tests/SequencerTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

namespace Clue\Tests\React\Utf8;

use Clue\React\Utf8\Sequencer;
use React\Stream\ThroughStream;

Expand All @@ -8,7 +10,10 @@ class SequencerTest extends TestCase
private $input;
private $sequencer;

public function setUp()
/**
* @before
*/
public function setUpSequencer()
{
$this->input = new ThroughStream();
$this->sequencer = new Sequencer($this->input);
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,10 +1,8 @@
<?php

require_once __DIR__ . '/../vendor/autoload.php';
namespace Clue\Tests\React\Utf8;

error_reporting(-1);

class TestCase extends PHPUnit_Framework_TestCase
class TestCase extends \PHPUnit\Framework\TestCase
{
protected function expectCallableNever()
{
Expand Down Expand Up @@ -53,14 +51,6 @@ protected function expectCallableOnceParameter($type)
*/
protected function createCallableMock()
{
return $this->getMockBuilder('CallableStub')->getMock();
return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock();
}
}

class CallableStub
{
public function __invoke()
{
}
}