diff options
author | Mario <mario@mariovavti.com> | 2019-12-04 10:25:11 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-12-04 10:25:11 +0000 |
commit | bde429cff649237984903a252ba1a718e6d74f53 (patch) | |
tree | b2b2570159cfb37689e6ce3b96c3b1b988d676cc /vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php | |
parent | cc9f41df5f83bcab435d6fb941b5a8f5b1457037 (diff) | |
parent | 4c8d33d1eb2a804aa70a7bc677d6c73d0d94816b (diff) | |
download | volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.tar.gz volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.tar.bz2 volse-hubzilla-bde429cff649237984903a252ba1a718e6d74f53.zip |
Merge branch '4.6RC'4.6
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php b/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php index e98fe9048..1e4b92197 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php @@ -1,27 +1,29 @@ <?php -namespace Sabre\DAV; +declare(strict_types=1); -class StringUtilTest extends \PHPUnit_Framework_TestCase { +namespace Sabre\DAV; +class StringUtilTest extends \PHPUnit\Framework\TestCase +{ /** * @param string $haystack * @param string $needle * @param string $collation * @param string $matchType * @param string $result + * * @throws Exception\BadRequest * * @dataProvider dataset */ - function testTextMatch($haystack, $needle, $collation, $matchType, $result) { - + public function testTextMatch($haystack, $needle, $collation, $matchType, $result) + { $this->assertEquals($result, StringUtil::textMatch($haystack, $needle, $collation, $matchType)); - } - function dataset() { - + public function dataset() + { return [ ['FOOBAR', 'FOO', 'i;octet', 'contains', true], ['FOOBAR', 'foo', 'i;octet', 'contains', false], @@ -68,62 +70,54 @@ class StringUtilTest extends \PHPUnit_Framework_TestCase { ['FOOBAR', 'BAR', 'i;unicode-casemap', 'ends-with', true], ['FOOBAR', 'bar', 'i;unicode-casemap', 'ends-with', true], ]; - } /** - * @expectedException Sabre\DAV\Exception\BadRequest + * @expectedException \Sabre\DAV\Exception\BadRequest */ - function testBadCollation() { - + public function testBadCollation() + { StringUtil::textMatch('foobar', 'foo', 'blabla', 'contains'); - } - /** - * @expectedException Sabre\DAV\Exception\BadRequest + * @expectedException \Sabre\DAV\Exception\BadRequest */ - function testBadMatchType() { - + public function testBadMatchType() + { StringUtil::textMatch('foobar', 'foo', 'i;octet', 'booh'); - } - function testEnsureUTF8_ascii() { - - $inputString = "harkema"; - $outputString = "harkema"; + public function testEnsureUTF8_ascii() + { + $inputString = 'harkema'; + $outputString = 'harkema'; $this->assertEquals( $outputString, StringUtil::ensureUTF8($inputString) ); - } - function testEnsureUTF8_latin1() { - + public function testEnsureUTF8_latin1() + { $inputString = "m\xfcnster"; - $outputString = "münster"; + $outputString = 'münster'; $this->assertEquals( $outputString, StringUtil::ensureUTF8($inputString) ); - } - function testEnsureUTF8_utf8() { - + public function testEnsureUTF8_utf8() + { $inputString = "m\xc3\xbcnster"; - $outputString = "münster"; + $outputString = 'münster'; $this->assertEquals( $outputString, StringUtil::ensureUTF8($inputString) ); - } - } |