mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-09 06:46:40 +02:00
Merge branch 'indexOf'
This commit is contained in:
@@ -153,6 +153,24 @@ class StringyTestCase extends CommonTest
|
||||
unset($stringy[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider indexOfProvider()
|
||||
*/
|
||||
public function testIndexOf($expected, $str, $subStr, $offset = 0, $encoding = null)
|
||||
{
|
||||
$result = S::create($str, $encoding)->indexOf($subStr, $offset);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider indexOfLastProvider()
|
||||
*/
|
||||
public function testIndexOfLast($expected, $str, $subStr, $offset = 0, $encoding = null)
|
||||
{
|
||||
$result = S::create($str, $encoding)->indexOfLast($subStr, $offset);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider charsProvider()
|
||||
*/
|
||||
|
Reference in New Issue
Block a user