Skip to content

Commit

Permalink
Fix of liip#369 (Trim of forwarding slash in path)
Browse files Browse the repository at this point in the history
  • Loading branch information
Iakov Mishchenko committed Apr 24, 2014
1 parent 94f4465 commit 64e2d7d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/Imagine/Cache/Resolver/WebPathResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,24 @@ public function testRemoveCacheForSomeFiltersOnRemove()
$resolver->remove(array(), array('aFilterOne', 'aFilterTwo'));
}

public function testShouldRemoveDoubleSlashInUrl()
{
$resolver = new WebPathResolver(
$this->createFilesystemMock(),
new RequestContext,
'/aWebRoot',
'aCachePrefix'
);

$rc = new \ReflectionClass($resolver);
$method = $rc->getMethod('getFileUrl');
$method->setAccessible(true);

$result = $method->invokeArgs($resolver, array('/cats.jpg', 'some_filter'));

$this->assertNotContains('//', $result);
}

/**
* @return \PHPUnit_Framework_MockObject_MockObject|Filesystem
*/
Expand Down

0 comments on commit 64e2d7d

Please sign in to comment.