Skip to content

Commit

Permalink
Testing updates for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwdan committed Mar 21, 2017
1 parent 8a2f001 commit c957d77
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: php
sudo: required

php:
- 5.6
- 7
- 7.0
- 7.1
- hhvm

matrix:
Expand All @@ -14,4 +14,4 @@ install:
- composer install

script:
- phpunit
- vendor/bin/phpunit
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
}
},
"require": {
"voryx/event-loop": "^2.0.0",
"voryx/event-loop": "^2.0",
"react/child-process": "^0.4.3",
"reactivex/rxphp": "2.x-dev"
"reactivex/rxphp": "^2.0"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -42,5 +42,8 @@
"files": [
"vendor/reactivex/rxphp/test/helper-functions.php"
]
},
"require-dev": {
"phpunit/phpunit": "^5.5"
}
}
15 changes: 11 additions & 4 deletions examples/command.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?php

require __DIR__ . '/../vendor/autoload.php';
use Rx\Observable;
use Rx\React\ProcessSubject;
use Rx\Thruway\Client;

$process = new \Rx\React\ProcessSubject('echo foo');
require __DIR__ . '/../vendor/autoload.php';

$process->subscribe(function ($x) {
echo $x;
$top = (new ProcessSubject('top -l 1'))->repeatWhen(function (Observable $attempts) {
return $attempts->delay(3000);
});


(new Client('ws://127.0.0.1:9090', 'realm1'))->publish('top.of.the.morning', $top);

$top->subscribe('print_r');
1 change: 0 additions & 1 deletion src/ProcessSubject.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use React\ChildProcess\Process;
use React\EventLoop\LoopInterface;
use Rx\Disposable\CallbackDisposable;
use Rx\Disposable\EmptyDisposable;
use Rx\DisposableInterface;
use Rx\ObserverInterface;
use Rx\Subject\Subject;
Expand Down

0 comments on commit c957d77

Please sign in to comment.