|
@@ 168-175 (lines=8) @@
|
| 165 |
|
$this->beautifier->fromUrl(""); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function testAddSameRefinementMultipleTimes() |
| 169 |
|
{ |
| 170 |
|
$this->setUpTestHeightAndCategoryRefinements(); |
| 171 |
|
$this->beautifier->setAppend(".html"); |
| 172 |
|
$url = $this->beautifier->toUrl("", |
| 173 |
|
"test=value~test=value~test=value2~height=20in~category=computer+accessories"); |
| 174 |
|
$this->assertEquals("/value/value2/20in/computer%2Baccessories/tthc.html", $url); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function testAppend() |
| 178 |
|
{ |
|
@@ 177-183 (lines=7) @@
|
| 174 |
|
$this->assertEquals("/value/value2/20in/computer%2Baccessories/tthc.html", $url); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
public function testAppend() |
| 178 |
|
{ |
| 179 |
|
$this->beautifier->setAppend(".html"); |
| 180 |
|
$this->setUpTestHeightAndCategoryRefinements(); |
| 181 |
|
$url = $this->beautifier->toUrl("", "test=value~height=20in~category=computer accessories"); |
| 182 |
|
$this->assertEquals("/value/20in/computer+accessories/thc.html", $url); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
public function testAppendWithSlash() |
| 186 |
|
{ |
|
@@ 185-191 (lines=7) @@
|
| 182 |
|
$this->assertEquals("/value/20in/computer+accessories/thc.html", $url); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
public function testAppendWithSlash() |
| 186 |
|
{ |
| 187 |
|
$this->beautifier->setAppend("/index.html"); |
| 188 |
|
$this->setUpTestHeightAndCategoryRefinements(); |
| 189 |
|
$url = $this->beautifier->toUrl("", "test=value~height=20in~category=computer accessories"); |
| 190 |
|
$this->assertEquals("/value/20in/computer+accessories/thc/index.html", $url); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
public function testUnappend() |
| 194 |
|
{ |
|
@@ 234-241 (lines=8) @@
|
| 231 |
|
"/value/20in/computer+accessories/thc?refinements=%7Ecategory2%3Dmice%7Ecat3%3Dwireless+mice", $url); |
| 232 |
|
} |
| 233 |
|
|
| 234 |
|
public function testUnmappedToUrlWithModifiedName() |
| 235 |
|
{ |
| 236 |
|
$this->setUpTestHeightAndCategoryRefinements(); |
| 237 |
|
$this->beautifier->setRefinementsQueryParamName("r"); |
| 238 |
|
$url = $this->beautifier->toUrl("", |
| 239 |
|
"test=value~height=20in~category2=mice~cat3=wireless mice~category=computer accessories"); |
| 240 |
|
$this->assertEquals("/value/20in/computer+accessories/thc?r=%7Ecategory2%3Dmice%7Ecat3%3Dwireless+mice", $url); |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
public function testUnmappedFromUrl() |
| 244 |
|
{ |