Skip to content

Commit

Permalink
a test to break preg_match if xdebug.scream turned on
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbasic committed Jan 28, 2012
1 parent 65c506c commit d9d8dfa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Mockery/ExpectationTest.php
Expand Up @@ -1588,6 +1588,26 @@ public function testMockingDemeterChainsPassesMockeryExpectationToCompositeExpec
$demeter = new Mockery_UseDemeter($mock);
$this->assertSame('Spam!', $demeter->doit());
}

/**
* @expectedException PHPUnit_Framework_Error_Warning
*/
public function testPregMatchThrowsDelimiterWarningWithXdebugScreamTurnedOn()
{
if (!extension_loaded('xdebug')) {
$this->markTestSkipped('ext/xdebug not installed');
}

if (ini_get('xdebug.scream') == 0) {
$this->markTestSkipped('xdebug.scream turned off');
}

$mock = $this->container->mock('foo');
$mock->shouldReceive('foo')->with('bar', 'baz');

$mock->foo('spam', 'ham');
}

}

class MockeryTest_InterMethod1
Expand Down

0 comments on commit d9d8dfa

Please sign in to comment.