Fixed tests on Windows using bad path separators

This commit is contained in:
Marcin Kurczewski 2014-09-22 14:01:56 +02:00
parent 2f0d0f5fb7
commit a47be4b78f

View file

@ -63,7 +63,7 @@ class ThumbnailServiceTest extends \Szurubooru\Tests\AbstractTestCase
->method('load') ->method('load')
->withConsecutive( ->withConsecutive(
['nope'], ['nope'],
['thumbnails/blank.png']) ['thumbnails' . DIRECTORY_SEPARATOR . 'blank.png'])
->will( ->will(
$this->onConsecutiveCalls( $this->onConsecutiveCalls(
null, null,
@ -82,7 +82,7 @@ class ThumbnailServiceTest extends \Szurubooru\Tests\AbstractTestCase
$this->fileServiceMock $this->fileServiceMock
->expects($this->once()) ->expects($this->once())
->method('save') ->method('save')
->with('thumbnails/100x100/nope', 'generated thumbnail'); ->with('thumbnails' . DIRECTORY_SEPARATOR . '100x100' . DIRECTORY_SEPARATOR . 'nope', 'generated thumbnail');
$thumbnailService = $this->getThumbnailService(); $thumbnailService = $this->getThumbnailService();
$thumbnailService->generate('nope', 100, 100); $thumbnailService->generate('nope', 100, 100);
@ -97,8 +97,8 @@ class ThumbnailServiceTest extends \Szurubooru\Tests\AbstractTestCase
->method('load') ->method('load')
->withConsecutive( ->withConsecutive(
['nope'], ['nope'],
['thumbnails/blank.png'], ['thumbnails' . DIRECTORY_SEPARATOR . 'blank.png'],
['thumbnails/blank.png']) ['thumbnails' . DIRECTORY_SEPARATOR . 'blank.png'])
->will( ->will(
$this->onConsecutiveCalls( $this->onConsecutiveCalls(
null, null,
@ -118,7 +118,7 @@ class ThumbnailServiceTest extends \Szurubooru\Tests\AbstractTestCase
$this->fileServiceMock $this->fileServiceMock
->expects($this->once()) ->expects($this->once())
->method('save') ->method('save')
->with('thumbnails/100x100/nope', 'content of blank thumbnail (2)'); ->with('thumbnails' . DIRECTORY_SEPARATOR . '100x100' . DIRECTORY_SEPARATOR . 'nope', 'content of blank thumbnail (2)');
$thumbnailService = $this->getThumbnailService(); $thumbnailService = $this->getThumbnailService();
$thumbnailService->generate('nope', 100, 100); $thumbnailService->generate('nope', 100, 100);