|
@@ 560-567 (lines=8) @@
|
| 557 |
|
$this->assertToAndFromUrl($searchString, $refinements, "value", "20-in", "computer accessories"); |
| 558 |
|
} |
| 559 |
|
|
| 560 |
|
public function testToUrlWithReplaceWithRefinement() |
| 561 |
|
{ |
| 562 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 563 |
|
$this->beautifier->addReplacementRule("/", " ") |
| 564 |
|
->addReplacementRule("&", " ", Beauty::SEARCH_NAVIGATION_NAME); |
| 565 |
|
$refinements = "test=val&ue~height=20/in~category=computer accessories"; |
| 566 |
|
$this->assertToAndFromUrl("test&query", $refinements, "val&ue", "20/in", "computer accessories"); |
| 567 |
|
} |
| 568 |
|
|
| 569 |
|
private function setUpTestHeightCategoryAndSearch() |
| 570 |
|
{ |
|
@@ 619-627 (lines=9) @@
|
| 616 |
|
$this->assertToAndFromUrl($searchString, $refinements, "val&ue", "20-in", "computer accessories"); |
| 617 |
|
} |
| 618 |
|
|
| 619 |
|
public function assertToAndFromUrlWithReplaceWithSpecialChar() |
| 620 |
|
{ |
| 621 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 622 |
|
$this->beautifier->setAppend("/index.html") |
| 623 |
|
->addReplacementRule("e", "/") |
| 624 |
|
->addReplacementRule("a", "\\"); |
| 625 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 626 |
|
$this->assertToAndFromUrl("test&query", $refinements, "val&ue", "20-in", "computer accessories"); |
| 627 |
|
} |
| 628 |
|
|
| 629 |
|
public function assertToAndFromUrlWithReplaceWithSpecialChar2() |
| 630 |
|
{ |
|
@@ 629-636 (lines=8) @@
|
| 626 |
|
$this->assertToAndFromUrl("test&query", $refinements, "val&ue", "20-in", "computer accessories"); |
| 627 |
|
} |
| 628 |
|
|
| 629 |
|
public function assertToAndFromUrlWithReplaceWithSpecialChar2() |
| 630 |
|
{ |
| 631 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 632 |
|
$this->beautifier->setAppend("/index.html") |
| 633 |
|
->addReplacementRule("e", "%"); |
| 634 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 635 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 636 |
|
} |
| 637 |
|
|
| 638 |
|
public function assertToAndFromUrlWithReplaceWithRegexSpecialChar() |
| 639 |
|
{ |
|
@@ 638-645 (lines=8) @@
|
| 635 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 636 |
|
} |
| 637 |
|
|
| 638 |
|
public function assertToAndFromUrlWithReplaceWithRegexSpecialChar() |
| 639 |
|
{ |
| 640 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 641 |
|
$this->beautifier->setAppend("/index.html") |
| 642 |
|
->addReplacementRule(".", "%"); |
| 643 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 644 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 645 |
|
} |
| 646 |
|
|
| 647 |
|
public function assertToAndFromUrlWithReplaceWithRegexSpecialChar2() |
| 648 |
|
{ |
|
@@ 647-654 (lines=8) @@
|
| 644 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 645 |
|
} |
| 646 |
|
|
| 647 |
|
public function assertToAndFromUrlWithReplaceWithRegexSpecialChar2() |
| 648 |
|
{ |
| 649 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 650 |
|
$this->beautifier->setAppend("/index.html") |
| 651 |
|
->addReplacementRule("e", "."); |
| 652 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 653 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 654 |
|
} |
| 655 |
|
|
| 656 |
|
public function assertToAndFromUrlWithReplaceWithSameChar() |
| 657 |
|
{ |
|
@@ 656-663 (lines=8) @@
|
| 653 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 654 |
|
} |
| 655 |
|
|
| 656 |
|
public function assertToAndFromUrlWithReplaceWithSameChar() |
| 657 |
|
{ |
| 658 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 659 |
|
$this->beautifier->setAppend("/index.html") |
| 660 |
|
->addReplacementRule("e", "e"); |
| 661 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 662 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 663 |
|
} |
| 664 |
|
|
| 665 |
|
public function assertToAndFromUrlWithNullSearchString() |
| 666 |
|
{ |
|
@@ 665-672 (lines=8) @@
|
| 662 |
|
$this->assertToAndFromUrl("test&qu%ery", $refinements, "val&ue", "20-in", "computer accessories"); |
| 663 |
|
} |
| 664 |
|
|
| 665 |
|
public function assertToAndFromUrlWithNullSearchString() |
| 666 |
|
{ |
| 667 |
|
$this->setUpTestHeightCategoryAndSearch(); |
| 668 |
|
$this->beautifier->setAppend("/index.html") |
| 669 |
|
->addReplacementRule("e", "e"); |
| 670 |
|
$refinements = "test=val&ue~height=20-in~category=computer accessories"; |
| 671 |
|
$this->assertToAndFromUrl(null, $refinements, "val&ue", "20-in", "computer accessories"); |
| 672 |
|
} |
| 673 |
|
} |
| 674 |
|
|