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

Rewrote Stringy::pad to be DRY.

Fixed "Class 'CommonTest' not found" error when running specific tests in PHPUnit by including tests directory in Composer's autoloader.
This commit is contained in:
Bilge
2014-02-13 18:03:02 +00:00
committed by Daniel St. Jules
parent 9399f7a694
commit 6103eca714
5 changed files with 40 additions and 139 deletions

View File

@@ -141,25 +141,6 @@ class StaticStringyTestCase extends CommonTest
$this->assertEquals($expected, $result);
}
/**
* @dataProvider padProvider()
*/
public function testPad($expected, $str, $length, $padStr = ' ',
$padType = 'right', $encoding = null)
{
$result = S::pad($str, $length, $padStr, $padType, $encoding);
$this->assertInternalType('string', $result);
$this->assertEquals($expected, $result);
}
/**
* @expectedException \InvalidArgumentException
*/
public function testPadException()
{
$result = S::pad('string', 5, 'foo', 'bar');
}
/**
* @dataProvider padLeftProvider()
*/