/** * Tests for stripos * * @param string $haystack String to search in * @param mixed $needle Characters to search * @param int $offset Start position * * @return void * @test * @dataProvider providerStriposException */ public function testStriposException($haystack, $needle, $offset = 0) { $native = null; $multibytes = null; $nativeException = false; $multibytesException = false; try { $native = $this->_native->stripos($haystack, $needle, $offset); } catch (PHPUnit_Framework_Error $e) { $nativeException = true; } try { $multibytes = $this->_mb->stripos($haystack, $needle, $offset); } catch (PHPUnit_Framework_Error $e) { $multibytesException = true; } $this->assertTrue(true === $nativeException && true === $multibytesException, 'native stripos: ' . var_export($native, true) . ' - mb stripos: ' . var_export($multibytes, true)); }