Skip to content

Commit

Permalink
Added test and travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
Pádraic Brady committed Jan 28, 2012
1 parent 41eb199 commit 5230537
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
@@ -0,0 +1,9 @@
language: php
php:
- 5.3
- 5.4
before-script:
- pyrus channel-discover hamcrest.googlecode.com/svn/pear
- pyrus install hamcrest/Hamcrest
- phpenv rehash
script: phpunit --coverage-text
19 changes: 19 additions & 0 deletions tests/Mockery/ExpectationTest.php
Expand Up @@ -1588,6 +1588,25 @@ 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 5230537

Please sign in to comment.