|
@@ 63-83 (lines=21) @@
|
| 60 |
|
return [$leftFolder, $rightFolder, $targetFolder]; |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
public function testConflictingConditions() |
| 64 |
|
{ |
| 65 |
|
list($leftFolder, $rightFolder, $targetFolder) = $this->createTestContent(); |
| 66 |
|
$locationService = $this->getRepository()->getLocationService(); |
| 67 |
|
$leftLocation = $locationService->loadLocation($leftFolder->contentInfo->mainLocationId); |
| 68 |
|
|
| 69 |
|
$query = new Query([ |
| 70 |
|
'filter' => new Query\Criterion\LogicalAnd([ |
| 71 |
|
new Query\Criterion\ContentId($targetFolder->contentInfo->id), |
| 72 |
|
new Query\Criterion\Subtree($leftLocation->pathString), |
| 73 |
|
new Query\Criterion\LogicalNot( |
| 74 |
|
new Query\Criterion\Subtree($leftLocation->pathString) |
| 75 |
|
), |
| 76 |
|
]), |
| 77 |
|
]); |
| 78 |
|
|
| 79 |
|
$searchService = $this->getRepository()->getSearchService(); |
| 80 |
|
$result = $searchService->findContent($query); |
| 81 |
|
|
| 82 |
|
$this->assertSame(0, $result->totalCount); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public function testNegativeSubtree() |
| 86 |
|
{ |
|
@@ 85-104 (lines=20) @@
|
| 82 |
|
$this->assertSame(0, $result->totalCount); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public function testNegativeSubtree() |
| 86 |
|
{ |
| 87 |
|
list($leftFolder, $rightFolder, $targetFolder) = $this->createTestContent(); |
| 88 |
|
$locationService = $this->getRepository()->getLocationService(); |
| 89 |
|
$leftLocation = $locationService->loadLocation($leftFolder->contentInfo->mainLocationId); |
| 90 |
|
|
| 91 |
|
$query = new Query([ |
| 92 |
|
'filter' => new Query\Criterion\LogicalAnd([ |
| 93 |
|
new Query\Criterion\ContentId($targetFolder->contentInfo->id), |
| 94 |
|
new Query\Criterion\LogicalNot( |
| 95 |
|
new Query\Criterion\Subtree($leftLocation->pathString) |
| 96 |
|
), |
| 97 |
|
]), |
| 98 |
|
]); |
| 99 |
|
|
| 100 |
|
$searchService = $this->getRepository()->getSearchService(); |
| 101 |
|
$result = $searchService->findContent($query); |
| 102 |
|
|
| 103 |
|
$this->assertSame(0, $result->totalCount); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|