@@ 822-830 (lines=9) @@ | ||
819 | /** |
|
820 | * @dataProvider startsWithProvider() |
|
821 | */ |
|
822 | public function testStartsWith($expected, $str, $substring, |
|
823 | $caseSensitive = true, $encoding = null) |
|
824 | { |
|
825 | $stringy = S::create($str, $encoding); |
|
826 | $result = $stringy->startsWith($substring, $caseSensitive); |
|
827 | $this->assertInternalType('boolean', $result); |
|
828 | $this->assertEquals($expected, $result); |
|
829 | $this->assertEquals($str, $stringy); |
|
830 | } |
|
831 | ||
832 | public function startsWithProvider() |
|
833 | { |
|
@@ 852-860 (lines=9) @@ | ||
849 | /** |
|
850 | * @dataProvider endsWithProvider() |
|
851 | */ |
|
852 | public function testEndsWith($expected, $str, $substring, |
|
853 | $caseSensitive = true, $encoding = null) |
|
854 | { |
|
855 | $stringy = S::create($str, $encoding); |
|
856 | $result = $stringy->endsWith($substring, $caseSensitive); |
|
857 | $this->assertInternalType('boolean', $result); |
|
858 | $this->assertEquals($expected, $result); |
|
859 | $this->assertEquals($str, $stringy); |
|
860 | } |
|
861 | ||
862 | public function endsWithProvider() |
|
863 | { |
|
@@ 882-889 (lines=8) @@ | ||
879 | /** |
|
880 | * @dataProvider toBooleanProvider() |
|
881 | */ |
|
882 | public function testToBoolean($expected, $str, $encoding = null) |
|
883 | { |
|
884 | $stringy = S::create($str, $encoding); |
|
885 | $result = $stringy->toBoolean(); |
|
886 | $this->assertInternalType('boolean', $result); |
|
887 | $this->assertEquals($expected, $result); |
|
888 | $this->assertEquals($str, $stringy); |
|
889 | } |
|
890 | ||
891 | public function toBooleanProvider() |
|
892 | { |
|
@@ 1099-1107 (lines=9) @@ | ||
1096 | /** |
|
1097 | * @dataProvider containsProvider() |
|
1098 | */ |
|
1099 | public function testContains($expected, $haystack, $needle, |
|
1100 | $caseSensitive = true, $encoding = null) |
|
1101 | { |
|
1102 | $stringy = S::create($haystack, $encoding); |
|
1103 | $result = $stringy->contains($needle, $caseSensitive); |
|
1104 | $this->assertInternalType('boolean', $result); |
|
1105 | $this->assertEquals($expected, $result); |
|
1106 | $this->assertEquals($haystack, $stringy); |
|
1107 | } |
|
1108 | ||
1109 | public function containsProvider() |
|
1110 | { |
|
@@ 1139-1147 (lines=9) @@ | ||
1136 | /** |
|
1137 | * @dataProvider containsAnyProvider() |
|
1138 | */ |
|
1139 | public function testcontainsAny($expected, $haystack, $needles, |
|
1140 | $caseSensitive = true, $encoding = null) |
|
1141 | { |
|
1142 | $stringy = S::create($haystack, $encoding); |
|
1143 | $result = $stringy->containsAny($needles, $caseSensitive); |
|
1144 | $this->assertInternalType('boolean', $result); |
|
1145 | $this->assertEquals($expected, $result); |
|
1146 | $this->assertEquals($haystack, $stringy); |
|
1147 | } |
|
1148 | ||
1149 | public function containsAnyProvider() |
|
1150 | { |
|
@@ 1190-1198 (lines=9) @@ | ||
1187 | /** |
|
1188 | * @dataProvider containsAllProvider() |
|
1189 | */ |
|
1190 | public function testContainsAll($expected, $haystack, $needles, |
|
1191 | $caseSensitive = true, $encoding = null) |
|
1192 | { |
|
1193 | $stringy = S::create($haystack, $encoding); |
|
1194 | $result = $stringy->containsAll($needles, $caseSensitive); |
|
1195 | $this->assertInternalType('boolean', $result); |
|
1196 | $this->assertEquals($expected, $result); |
|
1197 | $this->assertEquals($haystack, $stringy); |
|
1198 | } |
|
1199 | ||
1200 | public function containsAllProvider() |
|
1201 | { |
|
@@ 1965-1972 (lines=8) @@ | ||
1962 | /** |
|
1963 | * @dataProvider isAlphaProvider() |
|
1964 | */ |
|
1965 | public function testIsAlpha($expected, $str, $encoding = null) |
|
1966 | { |
|
1967 | $stringy = S::create($str, $encoding); |
|
1968 | $result = $stringy->isAlpha(); |
|
1969 | $this->assertInternalType('boolean', $result); |
|
1970 | $this->assertEquals($expected, $result); |
|
1971 | $this->assertEquals($str, $stringy); |
|
1972 | } |
|
1973 | ||
1974 | public function isAlphaProvider() |
|
1975 | { |
|
@@ 1993-2000 (lines=8) @@ | ||
1990 | /** |
|
1991 | * @dataProvider isAlphanumericProvider() |
|
1992 | */ |
|
1993 | public function testIsAlphanumeric($expected, $str, $encoding = null) |
|
1994 | { |
|
1995 | $stringy = S::create($str, $encoding); |
|
1996 | $result = $stringy->isAlphanumeric(); |
|
1997 | $this->assertInternalType('boolean', $result); |
|
1998 | $this->assertEquals($expected, $result); |
|
1999 | $this->assertEquals($str, $stringy); |
|
2000 | } |
|
2001 | ||
2002 | public function isAlphanumericProvider() |
|
2003 | { |
|
@@ 2024-2031 (lines=8) @@ | ||
2021 | /** |
|
2022 | * @dataProvider isBlankProvider() |
|
2023 | */ |
|
2024 | public function testIsBlank($expected, $str, $encoding = null) |
|
2025 | { |
|
2026 | $stringy = S::create($str, $encoding); |
|
2027 | $result = $stringy->isBlank(); |
|
2028 | $this->assertInternalType('boolean', $result); |
|
2029 | $this->assertEquals($expected, $result); |
|
2030 | $this->assertEquals($str, $stringy); |
|
2031 | } |
|
2032 | ||
2033 | public function isBlankProvider() |
|
2034 | { |
|
@@ 2057-2064 (lines=8) @@ | ||
2054 | /** |
|
2055 | * @dataProvider isJsonProvider() |
|
2056 | */ |
|
2057 | public function testIsJson($expected, $str, $encoding = null) |
|
2058 | { |
|
2059 | $stringy = S::create($str, $encoding); |
|
2060 | $result = $stringy->isJson(); |
|
2061 | $this->assertInternalType('boolean', $result); |
|
2062 | $this->assertEquals($expected, $result); |
|
2063 | $this->assertEquals($str, $stringy); |
|
2064 | } |
|
2065 | ||
2066 | public function isJsonProvider() |
|
2067 | { |
|
@@ 2089-2096 (lines=8) @@ | ||
2086 | /** |
|
2087 | * @dataProvider isLowerCaseProvider() |
|
2088 | */ |
|
2089 | public function testIsLowerCase($expected, $str, $encoding = null) |
|
2090 | { |
|
2091 | $stringy = S::create($str, $encoding); |
|
2092 | $result = $stringy->isLowerCase(); |
|
2093 | $this->assertInternalType('boolean', $result); |
|
2094 | $this->assertEquals($expected, $result); |
|
2095 | $this->assertEquals($str, $stringy); |
|
2096 | } |
|
2097 | ||
2098 | public function isLowerCaseProvider() |
|
2099 | { |
|
@@ 2115-2122 (lines=8) @@ | ||
2112 | /** |
|
2113 | * @dataProvider hasLowerCaseProvider() |
|
2114 | */ |
|
2115 | public function testHasLowerCase($expected, $str, $encoding = null) |
|
2116 | { |
|
2117 | $stringy = S::create($str, $encoding); |
|
2118 | $result = $stringy->hasLowerCase(); |
|
2119 | $this->assertInternalType('boolean', $result); |
|
2120 | $this->assertEquals($expected, $result); |
|
2121 | $this->assertEquals($str, $stringy); |
|
2122 | } |
|
2123 | ||
2124 | public function hasLowerCaseProvider() |
|
2125 | { |
|
@@ 2145-2152 (lines=8) @@ | ||
2142 | /** |
|
2143 | * @dataProvider isSerializedProvider() |
|
2144 | */ |
|
2145 | public function testIsSerialized($expected, $str, $encoding = null) |
|
2146 | { |
|
2147 | $stringy = S::create($str, $encoding); |
|
2148 | $result = $stringy->isSerialized(); |
|
2149 | $this->assertInternalType('boolean', $result); |
|
2150 | $this->assertEquals($expected, $result); |
|
2151 | $this->assertEquals($str, $stringy); |
|
2152 | } |
|
2153 | ||
2154 | public function isSerializedProvider() |
|
2155 | { |
|
@@ 2170-2177 (lines=8) @@ | ||
2167 | /** |
|
2168 | * @dataProvider isUpperCaseProvider() |
|
2169 | */ |
|
2170 | public function testIsUpperCase($expected, $str, $encoding = null) |
|
2171 | { |
|
2172 | $stringy = S::create($str, $encoding); |
|
2173 | $result = $stringy->isUpperCase(); |
|
2174 | $this->assertInternalType('boolean', $result); |
|
2175 | $this->assertEquals($expected, $result); |
|
2176 | $this->assertEquals($str, $stringy); |
|
2177 | } |
|
2178 | ||
2179 | public function isUpperCaseProvider() |
|
2180 | { |
|
@@ 2196-2203 (lines=8) @@ | ||
2193 | /** |
|
2194 | * @dataProvider hasUpperCaseProvider() |
|
2195 | */ |
|
2196 | public function testHasUpperCase($expected, $str, $encoding = null) |
|
2197 | { |
|
2198 | $stringy = S::create($str, $encoding); |
|
2199 | $result = $stringy->hasUpperCase(); |
|
2200 | $this->assertInternalType('boolean', $result); |
|
2201 | $this->assertEquals($expected, $result); |
|
2202 | $this->assertEquals($str, $stringy); |
|
2203 | } |
|
2204 | ||
2205 | public function hasUpperCaseProvider() |
|
2206 | { |
|
@@ 2226-2233 (lines=8) @@ | ||
2223 | /** |
|
2224 | * @dataProvider isHexadecimalProvider() |
|
2225 | */ |
|
2226 | public function testIsHexadecimal($expected, $str, $encoding = null) |
|
2227 | { |
|
2228 | $stringy = S::create($str, $encoding); |
|
2229 | $result = $stringy->isHexadecimal(); |
|
2230 | $this->assertInternalType('boolean', $result); |
|
2231 | $this->assertEquals($expected, $result); |
|
2232 | $this->assertEquals($str, $stringy); |
|
2233 | } |
|
2234 | ||
2235 | public function isHexadecimalProvider() |
|
2236 | { |