1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-06 21:36:31 +02:00

Merge branch 'indexOf'

This commit is contained in:
Daniel St. Jules
2015-06-29 14:56:25 -07:00
6 changed files with 140 additions and 0 deletions

View File

@@ -6,6 +6,24 @@ use Stringy\StaticStringy as S;
class StaticStringyTestCase extends CommonTest
{
/**
* @dataProvider indexOfProvider()
*/
public function testIndexOf($expected, $str, $subStr, $offset = 0, $encoding = null)
{
$result = S::indexOf($str, $subStr, $offset, $encoding);
$this->assertEquals($expected, $result);
}
/**
* @dataProvider indexOfLastProvider()
*/
public function testIndexOfLast($expected, $str, $subStr, $offset = 0, $encoding = null)
{
$result = S::indexOfLast($str, $subStr, $offset, $encoding);
$this->assertEquals($expected, $result);
}
/**
* @dataProvider charsProvider()
*/