1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-29 16:00:40 +02:00

Added test to cover 100% + fixed fatal error

This commit is contained in:
ChristianGaertner
2013-09-03 23:17:51 +02:00
committed by Christian Gärtner
parent a6964e4561
commit bc175f0e12
3 changed files with 18 additions and 1 deletions

View File

@@ -139,6 +139,14 @@ class StaticStringyTestCase extends CommonTest
$this->assertEquals($expected, $result);
}
/**
* @expectedException \InvalidArgumentException
*/
public function testPadException()
{
$result = S::pad('string', 5, 'foo', 'bar');
}
/**
* @dataProvider stringsForPadLeft
*/

View File

@@ -187,6 +187,15 @@ class StringyTestCase extends CommonTest
$this->assertEquals($str, $stringy);
}
/**
* @expectedException \InvalidArgumentException
*/
public function testPadException()
{
$stringy = S::create('foo');
$result = $stringy->pad(5, 'foo', 'bar');
}
/**
* @dataProvider stringsForPadLeft
*/