Skip to content

Commit

Permalink
Skip all tests that are known to fail due to engine inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Nov 8, 2015
1 parent 80cbdeb commit 7cd7e4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tests/FilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,11 @@ public function testRemoveFilter()

public function testAppendFunDechunk()
{
try {
$dechunk = StreamFilter\fun('dechunk');
} catch (Exception $e) {
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM');
throw $e;
}
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (dechunk filter does not exist)');

$stream = $this->createStream();

StreamFilter\append($stream, $dechunk, STREAM_FILTER_WRITE);
StreamFilter\append($stream, StreamFilter\fun('dechunk'), STREAM_FILTER_WRITE);

fwrite($stream, "2\r\nhe\r\n");
fwrite($stream, "3\r\nllo\r\n");
Expand Down Expand Up @@ -280,8 +275,8 @@ public function testAppendThrowsDuringEnd()

// We can only assert we're not seeing an exception here…
// * php 5.3-5.6 sees one error here
// * php 7 does not any error here
// * hhvm seems the same error twice
// * php 7 does not see any error here
// * hhvm sees the same error twice
//
// If you're curious:
//
Expand Down Expand Up @@ -339,26 +334,26 @@ public function testAppendThrowsShouldTriggerEndButIgnoreExceptionDuringEnd()
*/
public function testAppendInvalidStreamIsRuntimeError()
{
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
StreamFilter\append(false, function () { });
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM');
}

/**
* @expectedException RuntimeException
*/
public function testPrependInvalidStreamIsRuntimeError()
{
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid stream)');
StreamFilter\prepend(false, function () { });
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM');
}

/**
* @expectedException RuntimeException
*/
public function testRemoveInvalidFilterIsRuntimeError()
{
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (does not reject invalid filters)');
StreamFilter\remove(false);
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM');
}

/**
Expand Down
4 changes: 4 additions & 0 deletions tests/FunZlibTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class BuiltInZlibTest extends PHPUnit_Framework_TestCase
{
public function testFunZlibDeflateEmpty()
{
if (PHP_VERSION >= 7) $this->markTestSkipped('Not supported on PHP7 (empty string does not invoke filter)');

$deflate = StreamFilter\fun('zlib.deflate');

//$data = gzdeflate('');
Expand All @@ -32,6 +34,8 @@ public function testFunZlibDeflateBig()

public function testFunZlibInflateBig()
{
if (defined('HHVM_VERSION')) $this->markTestSkipped('Not supported on HHVM (final chunk will not be emitted)');

$inflate = StreamFilter\fun('zlib.inflate');

$expected = str_repeat('hello', 10);
Expand Down

0 comments on commit 7cd7e4c

Please sign in to comment.