|
@@ 150-179 (lines=30) @@
|
| 147 |
|
* |
| 148 |
|
* @see \eZ\Publish\Core\Repository\URLService::findUrls() |
| 149 |
|
*/ |
| 150 |
|
public function testFindUrls() |
| 151 |
|
{ |
| 152 |
|
$expectedUrls = [ |
| 153 |
|
'http://www.apache.org/', |
| 154 |
|
'http://calendar.google.com/calendar/render', |
| 155 |
|
'http://www.dropbox.com/', |
| 156 |
|
'/content/view/sitemap/2', |
| 157 |
|
'http://support.google.com/chrome/answer/95647?hl=es', |
| 158 |
|
'http://www.nazwa.pl/', |
| 159 |
|
'http://www.facebook.com/sharer.php', |
| 160 |
|
'http://www.wikipedia.org/', |
| 161 |
|
'http://www.google.de/', |
| 162 |
|
'http://www.google.com/', |
| 163 |
|
'http://www.nginx.com/', |
| 164 |
|
'/content/view/tagcloud/2', |
| 165 |
|
'http://www.youtube.com/', |
| 166 |
|
'http://vimeo.com/', |
| 167 |
|
'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', |
| 168 |
|
'http://twitter.com/', |
| 169 |
|
'http://www.google.com/analytics/', |
| 170 |
|
'http://www.facebook.com/', |
| 171 |
|
'http://www.discuz.net/forum.php', |
| 172 |
|
'http://instagram.com/', |
| 173 |
|
]; |
| 174 |
|
|
| 175 |
|
$query = new URLQuery(); |
| 176 |
|
$query->filter = new Criterion\MatchAll(); |
| 177 |
|
|
| 178 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
/** |
| 182 |
|
* Test for URLService::findUrls() method. |
|
@@ 223-251 (lines=29) @@
|
| 220 |
|
* @see \eZ\Publish\Core\Repository\URLService::findUrls() |
| 221 |
|
* @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls |
| 222 |
|
*/ |
| 223 |
|
public function testFindUrlsUsingValidityCriterionValid() |
| 224 |
|
{ |
| 225 |
|
$expectedUrls = [ |
| 226 |
|
'http://www.google.com/', |
| 227 |
|
'/content/view/sitemap/2', |
| 228 |
|
'http://support.google.com/chrome/answer/95647?hl=es', |
| 229 |
|
'http://www.google.de/', |
| 230 |
|
'http://www.nginx.com/', |
| 231 |
|
'http://www.google.com/analytics/', |
| 232 |
|
'http://www.discuz.net/forum.php', |
| 233 |
|
'http://www.wikipedia.org/', |
| 234 |
|
'http://www.facebook.com/sharer.php', |
| 235 |
|
'http://twitter.com/', |
| 236 |
|
'http://www.nazwa.pl/', |
| 237 |
|
'http://instagram.com/', |
| 238 |
|
'http://www.apache.org/', |
| 239 |
|
'http://www.dropbox.com/', |
| 240 |
|
'http://www.facebook.com/', |
| 241 |
|
'http://www.youtube.com/', |
| 242 |
|
'http://calendar.google.com/calendar/render', |
| 243 |
|
'http://vimeo.com/', |
| 244 |
|
'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', |
| 245 |
|
]; |
| 246 |
|
|
| 247 |
|
$query = new URLQuery(); |
| 248 |
|
$query->filter = new Criterion\Validity(true); |
| 249 |
|
|
| 250 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
/** |
| 254 |
|
* Test for URLService::findUrls() method. |
|
@@ 277-305 (lines=29) @@
|
| 274 |
|
* @see \eZ\Publish\Core\Repository\URLService::findUrls() |
| 275 |
|
* @depends eZ\Publish\API\Repository\Tests\URLServiceTest::testFindUrls |
| 276 |
|
*/ |
| 277 |
|
public function testFindUrlsUsingVisibleOnlyCriterion() |
| 278 |
|
{ |
| 279 |
|
$expectedUrls = [ |
| 280 |
|
'http://vimeo.com/', |
| 281 |
|
'http://calendar.google.com/calendar/render', |
| 282 |
|
'http://www.facebook.com/', |
| 283 |
|
'http://www.google.com/', |
| 284 |
|
'http://www.google.com/analytics/', |
| 285 |
|
'http://www.facebook.com/sharer.php', |
| 286 |
|
'http://www.apache.org/', |
| 287 |
|
'http://www.nginx.com/', |
| 288 |
|
'http://www.wikipedia.org/', |
| 289 |
|
'http://www.youtube.com/', |
| 290 |
|
'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', |
| 291 |
|
'http://www.google.de/', |
| 292 |
|
'http://instagram.com/', |
| 293 |
|
'http://www.nazwa.pl/', |
| 294 |
|
'/content/view/tagcloud/2', |
| 295 |
|
'http://www.discuz.net/forum.php', |
| 296 |
|
'http://support.google.com/chrome/answer/95647?hl=es', |
| 297 |
|
'http://twitter.com/', |
| 298 |
|
'/content/view/sitemap/2', |
| 299 |
|
]; |
| 300 |
|
|
| 301 |
|
$query = new URLQuery(); |
| 302 |
|
$query->filter = new Criterion\VisibleOnly(); |
| 303 |
|
|
| 304 |
|
$this->doTestFindUrls($query, $expectedUrls); |
| 305 |
|
} |
| 306 |
|
|
| 307 |
|
/** |
| 308 |
|
* Test for URLService::findUrls() method. |