mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-04 01:54:07 +02:00
Seperate query classes from xml classes to allow specifying more information in the query
This commit is contained in:
parent
82bcf2cebb
commit
5ad4d24b89
17 changed files with 509 additions and 112 deletions
|
|
@ -50,12 +50,12 @@ class QueryParserTest extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals([
|
||||
new Scope('/container1/', 'infinity')
|
||||
], $search->from);
|
||||
$this->assertEquals(new Operator(Operator::OPERATION_GREATER_THAN, [
|
||||
$this->assertEquals(new Operator(\SearchDAV\Query\Operator::OPERATION_GREATER_THAN, [
|
||||
'{DAV:}getcontentlength',
|
||||
new Literal(10000)
|
||||
]), $search->where);
|
||||
$this->assertEquals([
|
||||
new Order('{DAV:}getcontentlength', Order::ASC)
|
||||
new Order('{DAV:}getcontentlength', \SearchDAV\Query\Order::ASC)
|
||||
], $search->orderBy);
|
||||
}
|
||||
|
||||
|
|
@ -75,12 +75,12 @@ class QueryParserTest extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals([
|
||||
new Scope('/container1/', 'infinity')
|
||||
], $search->from);
|
||||
$this->assertEquals(new Operator(Operator::OPERATION_GREATER_THAN, [
|
||||
$this->assertEquals(new Operator(\SearchDAV\Query\Operator::OPERATION_GREATER_THAN, [
|
||||
'{DAV:}getcontentlength',
|
||||
new Literal(10000)
|
||||
]), $search->where);
|
||||
$this->assertEquals([
|
||||
new Order('{DAV:}getcontentlength', Order::DESC)
|
||||
new Order('{DAV:}getcontentlength', \SearchDAV\Query\Order::DESC)
|
||||
], $search->orderBy);
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ class QueryParserTest extends \PHPUnit_Framework_TestCase {
|
|||
new Scope('/container1/', 'infinity'),
|
||||
new Scope('/container2/', 1),
|
||||
], $search->from);
|
||||
$this->assertEquals(new Operator(Operator::OPERATION_IS_COLLECTION, []), $search->where);
|
||||
$this->assertEquals(new Operator(\SearchDAV\Query\Operator::OPERATION_IS_COLLECTION, []), $search->where);
|
||||
$this->assertEquals([], $search->orderBy);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue