aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php56
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)
);
-
}
-
}