From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 17:26:44 -0700 Subject: initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import) --- .../Sabre/CardDAV/AddressBookQueryParserTest.php | 329 --------------------- 1 file changed, 329 deletions(-) delete mode 100644 vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryParserTest.php (limited to 'vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryParserTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryParserTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryParserTest.php deleted file mode 100644 index 51bea6c6c..000000000 --- a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryParserTest.php +++ /dev/null @@ -1,329 +0,0 @@ -parse(); - return $q; - - } - - function testFilterBasic() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - $this->assertEquals( - array('{DAV:}foo'), - $q->requestedProperties - ); - - $this->assertEquals( - array( - array( - 'name' => 'NICKNAME', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => array(), - 'text-matches' => array(), - ), - ), - $q->filters - ); - - $this->assertNull($q->limit); - $this->assertEquals('anyof', $q->test); - - } - - function testNoFilter() { - - // This is non-standard, but helps working around a KDE bug - $xml = array( - '', - '', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - $this->assertEquals( - array('{DAV:}foo'), - $q->requestedProperties - ); - - $this->assertEquals( - array(), - $q->filters - ); - - $this->assertNull($q->limit); - $this->assertEquals('anyof', $q->test); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testFilterDoubleFilter() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - } - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testFilterCorruptTest() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - } - - function testPropFilter() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' 4', - '' - ); - - $q = $this->parse($xml); - - $this->assertEquals( - array( - array( - 'name' => 'NICKNAME', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => array(), - 'text-matches' => array(), - ), - array( - 'name' => 'EMAIL', - 'test' => 'allof', - 'is-not-defined' => false, - 'param-filters' => array(), - 'text-matches' => array(), - ), - array( - 'name' => 'FN', - 'test' => 'anyof', - 'is-not-defined' => true, - 'param-filters' => array(), - 'text-matches' => array(), - ), - ), - $q->filters - ); - - $this->assertEquals(4,$q->limit); - $this->assertEquals('allof', $q->test); - - } - - function testParamFilter() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - $this->assertEquals( - array( - array( - 'name' => 'NICKNAME', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => array( - array( - 'name' => 'BLA', - 'is-not-defined' => false, - 'text-match' => null - ), - array( - 'name' => 'BLA2', - 'is-not-defined' => true, - 'text-match' => null - ), - ), - 'text-matches' => array(), - ), - ), - $q->filters - ); - - } - - function testTextMatch() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' evert', - ' evert', - ' rene', - ' e', - ' ', - ' foo', - ' ', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - $this->assertEquals( - array( - array( - 'name' => 'NICKNAME', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => array( - array( - 'name' => 'BLA', - 'is-not-defined' => false, - 'text-match' => array( - 'negate-condition' => false, - 'collation' => 'i;unicode-casemap', - 'match-type' => 'contains', - 'value' => 'foo', - ), - ), - ), - 'text-matches' => array( - array( - 'negate-condition' => false, - 'collation' => 'i;unicode-casemap', - 'match-type' => 'contains', - 'value' => 'evert', - ), - array( - 'negate-condition' => false, - 'collation' => 'i;octet', - 'match-type' => 'contains', - 'value' => 'evert', - ), - array( - 'negate-condition' => true, - 'collation' => 'i;unicode-casemap', - 'match-type' => 'contains', - 'value' => 'rene', - ), - array( - 'negate-condition' => false, - 'collation' => 'i;unicode-casemap', - 'match-type' => 'starts-with', - 'value' => 'e', - ), - ), - ), - ), - $q->filters - ); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testBadTextMatch() { - - $xml = array( - '', - '', - ' ', - ' ', - ' ', - ' ', - ' ', - ' evert', - ' ', - ' ', - '' - ); - - $q = $this->parse($xml); - - } -} -- cgit v1.2.3