Passing Unit Test

Turned on E_STRICT and fixed resulting unit test failures
This commit is contained in:
Chris Boden 2012-02-04 12:45:37 -05:00
parent 01804dac6c
commit cb49cf06e7
4 changed files with 8 additions and 6 deletions

2
composer.lock generated
View File

@ -1,5 +1,5 @@
{ {
"hash": "9c9347f555af9a961102c4158e6d2ae8", "hash": "e898a89b9f66807dae53937fe3b089d3",
"packages": [ "packages": [
{ {
"package": "guzzle", "package": "guzzle",

View File

@ -90,7 +90,9 @@ class IOServerComponent implements MessageComponentInterface {
$changed = $this->_resources; $changed = $this->_resources;
try { try {
$num_changed = $host->select($changed, $write = null, $except = null, null); $write = $except = null;
$num_changed = $host->select($changed, $write, $except, null);
} catch (Exception $e) { } catch (Exception $e) {
// master had a problem?...what to do? // master had a problem?...what to do?
return; return;

View File

@ -37,8 +37,7 @@ class IOServerComponentTest extends \PHPUnit_Framework_TestCase {
} }
public function testOnOpenPassesClonedSocket() { public function testOnOpenPassesClonedSocket() {
$master = $this->_catalyst; $this->_server->run($this->_catalyst);
$this->_server->run($master);
$master = $this->getMasterConnection(); $master = $this->getMasterConnection();
$this->_server->onOpen($master); $this->_server->onOpen($master);
@ -48,8 +47,7 @@ class IOServerComponentTest extends \PHPUnit_Framework_TestCase {
} }
public function testOnMessageSendsToApp() { public function testOnMessageSendsToApp() {
$master = $this->_catalyst; $this->_server->run($this->_catalyst);
$this->_server->run($master);
$master = $this->getMasterConnection(); $master = $this->getMasterConnection();
// todo, make FakeSocket better, set data in select, recv to pass data when called, then do this check // todo, make FakeSocket better, set data in select, recv to pass data when called, then do this check

View File

@ -1,3 +1,5 @@
<?php <?php
error_reporting(E_ALL | E_STRICT);
require_once dirname(__DIR__) . '/vendor/.composer/autoload.php'; require_once dirname(__DIR__) . '/vendor/.composer/autoload.php';