Skip to content

Commit

Permalink
fix tests breaking if GMP not installed - will skip properly
Browse files Browse the repository at this point in the history
  • Loading branch information
akitson-fu committed Sep 23, 2014
1 parent 6008ca8 commit b5367c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -357,4 +357,6 @@ V2.0.0 Add GMP support

V2.0.1 Additional gmp type checking

V2.0.2 update Zend dependencies
V2.0.2 update Zend dependencies

V2.03 fix tests breaking if GMP not installed - will skip properly
Expand Up @@ -69,6 +69,7 @@ public function testCreateWithUnsupportedParamTypesThrowsException()

/**
* @dataProvider correctParamCombinations
*
*/
public function testCreateWithCorrectParamTypesReturnsComplexType($r, $i)
{
Expand All @@ -77,8 +78,15 @@ public function testCreateWithCorrectParamTypesReturnsComplexType($r, $i)

}

/**
* For some reason phpunit ignores the requires annotation at the class level
* - it seems to process data providers first
*/
public function correctParamCombinations()
{
if (!extension_loaded('gmp')) {
return [[2,2]];
}
return [
//numeric int
[2,2],
Expand Down

0 comments on commit b5367c0

Please sign in to comment.