| @@ 95-101 (lines=7) @@ | ||
| 92 | } |
|
| 93 | ||
| 94 | ||
| 95 | public function testTransformSlashes() |
|
| 96 | { |
|
| 97 | $this->mockRouter->expects( $this->once() )->method( 'resolve' ) |
|
| 98 | ->will( $this->returnValue( 'shop/catalog/lists?test=a%2Fb') ); |
|
| 99 | ||
| 100 | $this->assertEquals( '/index.php/shop/catalog/lists?test=a%2Fb', $this->object->transform( 'shop', 'catalog', 'lists', array( 'test' => 'a/b' ) ) ); |
|
| 101 | } |
|
| 102 | ||
| 103 | ||
| 104 | public function testTransformArrays() |
|
| @@ 104-110 (lines=7) @@ | ||
| 101 | } |
|
| 102 | ||
| 103 | ||
| 104 | public function testTransformArrays() |
|
| 105 | { |
|
| 106 | $this->mockRouter->expects( $this->once() )->method( 'resolve' ) |
|
| 107 | ->will( $this->returnValue( 'shop/catalog/list?test%5B0%5D=a&test%5B1%5D=b') ); |
|
| 108 | ||
| 109 | $this->assertEquals( '/index.php/shop/catalog/list?test%5B0%5D=a&test%5B1%5D=b', $this->object->transform( 'shop', 'catalog', 'lists', array( 'test' => array( 'a', 'b' ) ) ) ); |
|
| 110 | } |
|
| 111 | ||
| 112 | ||
| 113 | public function testTransformTrailing() |
|
| @@ 113-119 (lines=7) @@ | ||
| 110 | } |
|
| 111 | ||
| 112 | ||
| 113 | public function testTransformTrailing() |
|
| 114 | { |
|
| 115 | $this->mockRouter->expects( $this->once() )->method( 'resolve' ) |
|
| 116 | ->will( $this->returnValue( 'shop/catalog/lists') ); |
|
| 117 | ||
| 118 | $this->assertEquals( '/index.php/shop/catalog/lists#a/b', $this->object->transform( 'shop', 'catalog', 'lists', array(), array( 'a', 'b' ) ) ); |
|
| 119 | } |
|
| 120 | ||
| 121 | ||
| 122 | public function testTransformAbsolute() |
|
| @@ 126-133 (lines=8) @@ | ||
| 123 | } |
|
| 124 | ||
| 125 | ||
| 126 | public function testGetMultiple() |
|
| 127 | { |
|
| 128 | $this->mock->expects( $this->exactly( 2 ) )->method( 'get' ) |
|
| 129 | ->will( $this->returnValue( 'value' ) ); |
|
| 130 | ||
| 131 | $expected = array( 'key1' => 'value', 'key2' => 'value' ); |
|
| 132 | $this->assertEquals( $expected, $this->object->getMultiple( array( 'key1', 'key2' ) ) ); |
|
| 133 | } |
|
| 134 | ||
| 135 | ||
| 136 | public function testGetMultipleWithSiteId() |
|