Unit Tests and fixes
Set some incomplete tests to pass Updated an interface bug found from unit tests
This commit is contained in:
parent
1b01582ab9
commit
0670568789
@ -49,7 +49,7 @@ class Connection {
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function &__get($name) {
|
public function __get($name) {
|
||||||
if (!$this->__isset($name)) {
|
if (!$this->__isset($name)) {
|
||||||
throw new \InvalidArgumentException("Attribute '{$name}' not found in Connection {$this->getID()}");
|
throw new \InvalidArgumentException("Attribute '{$name}' not found in Connection {$this->getID()}");
|
||||||
}
|
}
|
||||||
|
@ -240,17 +240,16 @@ class FrameTest extends \PHPUnit_Framework_TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider messageFragmentProvider
|
* @dataProvider UnframeMessageProvider
|
||||||
*/
|
*/
|
||||||
public function testCheckPiecingTogetherMessage($coalesced, $first_bin, $secnd_bin, $mask, $payload1, $payload2) {
|
public function testCheckPiecingTogetherMessage($msg, $encoded) {
|
||||||
return $this->markTestIncomplete('Ran out of time, had to attend to something else, come finish me!');
|
// return $this->markTestIncomplete('Ran out of time, had to attend to something else, come finish me!');
|
||||||
|
|
||||||
$this->_frame->addBuffer(static::convert($first_bin));
|
$framed = base64_decode($encoded);
|
||||||
$this->_frame->addBuffer(static::convert($second_bin));
|
for ($i = 0, $len = strlen($framed);$i < $len; $i++) {
|
||||||
// mask?
|
$this->_frame->addBuffer(substr($framed, $i, 1));
|
||||||
// $this->_frame->addBuffer(
|
}
|
||||||
// $this->_frame->addBuffer(
|
|
||||||
|
|
||||||
$this->assertEquals($coalesced, $this->_frame->isCoalesced());
|
$this->assertEquals($msg, $this->_frame->getPayload());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,7 +39,8 @@ class ConnectionTest extends \PHPUnit_Framework_TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testLambdaReturnValueOnGet() {
|
public function testLambdaReturnValueOnGet() {
|
||||||
$this->markTestIncomplete();
|
$this->_c->lambda = function() { return 'Hello World!'; };
|
||||||
|
$this->assertEquals('Hello World!', $this->_c->lambda);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user