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:
committed by
Christian Gärtner
parent
a6964e4561
commit
bc175f0e12
@@ -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
|
||||
*/
|
||||
|
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user