|
@@ -135,6 +135,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
if (!class_exists('org\\bovigo\\vfs\\vfsStream')) {
|
|
|
$this->markTestSkipped('Package vfsStream not installed');
|
|
|
}
|
|
|
+
|
|
|
$confDir = \org\bovigo\vfs\vfsStream::setup();
|
|
|
$mimetypealiases_dist = \org\bovigo\vfs\vfsStream::newFile('mimetypealiases.dist.json')->at($confDir);
|
|
|
|
|
@@ -157,7 +158,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/folder.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/folder.svg'))
|
|
|
->willReturn('folder.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|
|
@@ -176,7 +177,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/folder-shared.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/folder-shared.svg'))
|
|
|
->willReturn('folder-shared.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|
|
@@ -196,7 +197,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/folder-external.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/folder-external.svg'))
|
|
|
->willReturn('folder-external.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|
|
@@ -216,7 +217,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/my-type.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/my-type.svg'))
|
|
|
->willReturn('my-type.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|
|
@@ -237,12 +238,12 @@ class DetectionTest extends \Test\TestCase {
|
|
|
$urlGenerator->expects($this->exactly(2))
|
|
|
->method('imagePath')
|
|
|
->withConsecutive(
|
|
|
- [$this->equalTo('core'), $this->equalTo('filetypes/my-type.png')],
|
|
|
- [$this->equalTo('core'), $this->equalTo('filetypes/my.png')]
|
|
|
+ [$this->equalTo('core'), $this->equalTo('filetypes/my-type.svg')],
|
|
|
+ [$this->equalTo('core'), $this->equalTo('filetypes/my.svg')]
|
|
|
)
|
|
|
->willReturnCallback(
|
|
|
function ($appName, $file) {
|
|
|
- if ($file === 'filetypes/my.png') {
|
|
|
+ if ($file === 'filetypes/my.svg') {
|
|
|
return 'my.svg';
|
|
|
}
|
|
|
throw new \RuntimeException();
|
|
@@ -267,13 +268,13 @@ class DetectionTest extends \Test\TestCase {
|
|
|
$urlGenerator->expects($this->exactly(3))
|
|
|
->method('imagePath')
|
|
|
->withConsecutive(
|
|
|
- [$this->equalTo('core'), $this->equalTo('filetypes/foo-bar.png')],
|
|
|
- [$this->equalTo('core'), $this->equalTo('filetypes/foo.png')],
|
|
|
- [$this->equalTo('core'), $this->equalTo('filetypes/file.png')]
|
|
|
+ [$this->equalTo('core'), $this->equalTo('filetypes/foo-bar.svg')],
|
|
|
+ [$this->equalTo('core'), $this->equalTo('filetypes/foo.svg')],
|
|
|
+ [$this->equalTo('core'), $this->equalTo('filetypes/file.svg')]
|
|
|
)
|
|
|
->willReturnCallback(
|
|
|
function ($appName, $file) {
|
|
|
- if ($file === 'filetypes/file.png') {
|
|
|
+ if ($file === 'filetypes/file.svg') {
|
|
|
return 'file.svg';
|
|
|
}
|
|
|
throw new \RuntimeException();
|
|
@@ -296,7 +297,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/foo-bar.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/foo-bar.svg'))
|
|
|
->willReturn('foo-bar.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|
|
@@ -322,7 +323,7 @@ class DetectionTest extends \Test\TestCase {
|
|
|
//Only call the url generator once
|
|
|
$urlGenerator->expects($this->once())
|
|
|
->method('imagePath')
|
|
|
- ->with($this->equalTo('core'), $this->equalTo('filetypes/foobar-baz.png'))
|
|
|
+ ->with($this->equalTo('core'), $this->equalTo('filetypes/foobar-baz.svg'))
|
|
|
->willReturn('foobar-baz.svg');
|
|
|
|
|
|
$detection = new Detection($urlGenerator, $logger, $confDir->url(), $confDir->url());
|