|
@@ 220-234 (lines=15) @@
|
| 217 |
|
* @see \eZ\Publish\Core\Repository\URLService::findUrls() |
| 218 |
|
* @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls |
| 219 |
|
*/ |
| 220 |
|
public function testFindUrlsUsingPatternCriterion() |
| 221 |
|
{ |
| 222 |
|
$expectedUrls = [ |
| 223 |
|
'http://www.google.de/', |
| 224 |
|
'http://www.google.com/', |
| 225 |
|
'http://support.google.com/chrome/answer/95647?hl=es', |
| 226 |
|
'http://calendar.google.com/calendar/render', |
| 227 |
|
'http://www.google.com/analytics/', |
| 228 |
|
]; |
| 229 |
|
|
| 230 |
|
$query = new URLQuery(); |
| 231 |
|
$query->filter = new Criterion\Pattern('google'); |
| 232 |
|
|
| 233 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
/** |
| 237 |
|
* Test for URLService::findUrls() method. |
|
@@ 278-290 (lines=13) @@
|
| 275 |
|
* @covers \eZ\Publish\Core\Repository\URLService::findUrls |
| 276 |
|
* @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls |
| 277 |
|
*/ |
| 278 |
|
public function testFindUrlsUsingSectionIdCriterion(): void |
| 279 |
|
{ |
| 280 |
|
$expectedUrls = [ |
| 281 |
|
'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', |
| 282 |
|
'http://www.dropbox.com/', |
| 283 |
|
'http://www.google.de/', |
| 284 |
|
]; |
| 285 |
|
|
| 286 |
|
$query = new URLQuery(); |
| 287 |
|
$query->filter = new Criterion\SectionId([3]); |
| 288 |
|
|
| 289 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 290 |
|
} |
| 291 |
|
|
| 292 |
|
/** |
| 293 |
|
* Test for URLService::findUrls() method. |
|
@@ 321-333 (lines=13) @@
|
| 318 |
|
* @covers \eZ\Publish\Core\Repository\URLService::findUrls |
| 319 |
|
* @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls |
| 320 |
|
*/ |
| 321 |
|
public function testFindUrlsUsingSectionIdentifierCriterion(): void |
| 322 |
|
{ |
| 323 |
|
$expectedUrls = [ |
| 324 |
|
'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', |
| 325 |
|
'http://www.dropbox.com/', |
| 326 |
|
'http://www.google.de/', |
| 327 |
|
]; |
| 328 |
|
|
| 329 |
|
$query = new URLQuery(); |
| 330 |
|
$query->filter = new Criterion\SectionIdentifier(['media']); |
| 331 |
|
|
| 332 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
/** |
| 336 |
|
* Test for URLService::findUrls() method. |