public function testRedecorateFromTarget() { $this->targetDecoratorMock->expects($this->once())->method('undecorate')->with('/var/test/storage/images/file.png')->will($this->returnValue('images/file.png')); $this->sourceDecoratorMock->expects($this->once())->method('decorate')->with('images/file.png')->will($this->returnValue('http://static.example.com/images/file.png')); self::assertEquals('http://static.example.com/images/file.png', $this->redecorator->redecorateFromTarget('/var/test/storage/images/file.png')); }