| | 77 | } |
|---|
| | 78 | |
|---|
| | 79 | /** |
|---|
| | 80 | * test that encoder is applied correct |
|---|
| | 81 | * |
|---|
| | 82 | * @test |
|---|
| | 83 | */ |
|---|
| | 84 | public function beforeStrategyEmpty() |
|---|
| | 85 | { |
|---|
| | 86 | $this->strategyFilterDecorator->setStrategy(stubStrategyFilterDecorator::STRATEGY_BEFORE); |
|---|
| | 87 | $this->strategyFilterDecorator->expects($this->once()) |
|---|
| | 88 | ->method('doExecute') |
|---|
| | 89 | ->with($this->equalTo('')) |
|---|
| | 90 | ->will($this->returnValue('')); |
|---|
| | 91 | $this->mockFilter->expects($this->once()) |
|---|
| | 92 | ->method('execute') |
|---|
| | 93 | ->with($this->equalTo('')) |
|---|
| | 94 | ->will($this->returnValue('')); |
|---|
| | 96 | } |
|---|
| | 97 | |
|---|
| | 98 | /** |
|---|
| | 99 | * test that encoder is applied correct |
|---|
| | 100 | * |
|---|
| | 101 | * @test |
|---|
| | 102 | */ |
|---|
| | 103 | public function beforeStrategyNull() |
|---|
| | 104 | { |
|---|
| | 105 | $this->strategyFilterDecorator->setStrategy(stubStrategyFilterDecorator::STRATEGY_BEFORE); |
|---|
| | 106 | $this->strategyFilterDecorator->expects($this->once()) |
|---|
| | 107 | ->method('doExecute') |
|---|
| | 108 | ->with($this->equalTo(null)) |
|---|
| | 109 | ->will($this->returnValue(null)); |
|---|
| | 110 | $this->mockFilter->expects($this->once()) |
|---|
| | 111 | ->method('execute') |
|---|
| | 112 | ->with($this->equalTo(null)) |
|---|
| | 113 | ->will($this->returnValue(null)); |
|---|
| | 134 | } |
|---|
| | 135 | |
|---|
| | 136 | /** |
|---|
| | 137 | * test that encoder is applied correct |
|---|
| | 138 | * |
|---|
| | 139 | * @test |
|---|
| | 140 | */ |
|---|
| | 141 | public function afterStrategyEmpty() |
|---|
| | 142 | { |
|---|
| | 143 | $this->strategyFilterDecorator->setStrategy(stubStrategyFilterDecorator::STRATEGY_AFTER); |
|---|
| | 144 | $this->strategyFilterDecorator->expects($this->once()) |
|---|
| | 145 | ->method('doExecute') |
|---|
| | 146 | ->with($this->equalTo('')) |
|---|
| | 147 | ->will($this->returnValue('')); |
|---|
| | 148 | $this->mockFilter->expects($this->once()) |
|---|
| | 149 | ->method('execute') |
|---|
| | 150 | ->with($this->equalTo('')) |
|---|
| | 151 | ->will($this->returnValue('')); |
|---|
| | 153 | } |
|---|
| | 154 | |
|---|
| | 155 | /** |
|---|
| | 156 | * test that encoder is applied correct |
|---|
| | 157 | * |
|---|
| | 158 | * @test |
|---|
| | 159 | */ |
|---|
| | 160 | public function afterStrategyNull() |
|---|
| | 161 | { |
|---|
| | 162 | $this->strategyFilterDecorator->setStrategy(stubStrategyFilterDecorator::STRATEGY_AFTER); |
|---|
| | 163 | $this->strategyFilterDecorator->expects($this->once()) |
|---|
| | 164 | ->method('doExecute') |
|---|
| | 165 | ->with($this->equalTo(null)) |
|---|
| | 166 | ->will($this->returnValue(null)); |
|---|
| | 167 | $this->mockFilter->expects($this->once()) |
|---|
| | 168 | ->method('execute') |
|---|
| | 169 | ->with($this->equalTo(null)) |
|---|
| | 170 | ->will($this->returnValue(null)); |
|---|