Skip to content

Commit dacc811

Browse files
committed
Fix other line ending issues.
1 parent 3062cff commit dacc811

File tree

8 files changed

+660
-660
lines changed

8 files changed

+660
-660
lines changed
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
<?php
2-
3-
/**
4-
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5-
* Licensed under The MIT License
6-
* For full copyright and license information, please see the LICENSE.txt
7-
* Redistributions of files must retain the above copyright notice.
8-
*
9-
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10-
* @author Florian Krämer
11-
* @link https://github.com/Phauthentic
12-
* @license https://opensource.org/licenses/MIT MIT License
13-
*/
14-
15-
declare(strict_types=1);
16-
17-
namespace Phauthentic\Test\TestCase\Processor\Image\Exception;
18-
19-
use Phauthentic\Infrastructure\Storage\Processor\Image\Exception\TempFileCreationFailedException;
20-
use Phauthentic\Test\TestCase\TestCase;
21-
22-
/**
23-
* TempFileCreationFailedExceptionTest
24-
*/
25-
class TempFileCreationFailedExceptionTest extends TestCase
26-
{
27-
/**
28-
* @return void
29-
*/
30-
public function testException(): void
31-
{
32-
$exception = TempFileCreationFailedException::withFilename('/tmp/titus.jpg');
33-
$this->assertEquals(
34-
'Failed to create `/tmp/titus.jpg`',
35-
$exception->getMessage()
36-
);
37-
}
38-
}
1+
<?php
2+
3+
/**
4+
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5+
* Licensed under The MIT License
6+
* For full copyright and license information, please see the LICENSE.txt
7+
* Redistributions of files must retain the above copyright notice.
8+
*
9+
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10+
* @author Florian Krämer
11+
* @link https://github.com/Phauthentic
12+
* @license https://opensource.org/licenses/MIT MIT License
13+
*/
14+
15+
declare(strict_types=1);
16+
17+
namespace Phauthentic\Test\TestCase\Processor\Image\Exception;
18+
19+
use Phauthentic\Infrastructure\Storage\Processor\Image\Exception\TempFileCreationFailedException;
20+
use Phauthentic\Test\TestCase\TestCase;
21+
22+
/**
23+
* TempFileCreationFailedExceptionTest
24+
*/
25+
class TempFileCreationFailedExceptionTest extends TestCase
26+
{
27+
/**
28+
* @return void
29+
*/
30+
public function testException(): void
31+
{
32+
$exception = TempFileCreationFailedException::withFilename('/tmp/titus.jpg');
33+
$this->assertEquals(
34+
'Failed to create `/tmp/titus.jpg`',
35+
$exception->getMessage()
36+
);
37+
}
38+
}
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
<?php
2-
3-
/**
4-
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5-
* Licensed under The MIT License
6-
* For full copyright and license information, please see the LICENSE.txt
7-
* Redistributions of files must retain the above copyright notice.
8-
*
9-
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10-
* @author Florian Krämer
11-
* @link https://github.com/Phauthentic
12-
* @license https://opensource.org/licenses/MIT MIT License
13-
*/
14-
15-
declare(strict_types=1);
16-
17-
namespace Phauthentic\Test\TestCase\Processor\Image\Exception;
18-
19-
use Phauthentic\Infrastructure\Storage\Processor\Image\Exception\UnsupportedOperationException;
20-
use Phauthentic\Test\TestCase\TestCase;
21-
22-
/**
23-
* UnsupportedOperationExceptionTest
24-
*/
25-
class UnsupportedOperationExceptionTest extends TestCase
26-
{
27-
/**
28-
* @return void
29-
*/
30-
public function testException(): void
31-
{
32-
$exception = UnsupportedOperationException::withName('resize');
33-
$this->assertEquals(
34-
'Operation `resize` is not implemented or supported',
35-
$exception->getMessage()
36-
);
37-
}
38-
}
1+
<?php
2+
3+
/**
4+
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5+
* Licensed under The MIT License
6+
* For full copyright and license information, please see the LICENSE.txt
7+
* Redistributions of files must retain the above copyright notice.
8+
*
9+
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10+
* @author Florian Krämer
11+
* @link https://github.com/Phauthentic
12+
* @license https://opensource.org/licenses/MIT MIT License
13+
*/
14+
15+
declare(strict_types=1);
16+
17+
namespace Phauthentic\Test\TestCase\Processor\Image\Exception;
18+
19+
use Phauthentic\Infrastructure\Storage\Processor\Image\Exception\UnsupportedOperationException;
20+
use Phauthentic\Test\TestCase\TestCase;
21+
22+
/**
23+
* UnsupportedOperationExceptionTest
24+
*/
25+
class UnsupportedOperationExceptionTest extends TestCase
26+
{
27+
/**
28+
* @return void
29+
*/
30+
public function testException(): void
31+
{
32+
$exception = UnsupportedOperationException::withName('resize');
33+
$this->assertEquals(
34+
'Operation `resize` is not implemented or supported',
35+
$exception->getMessage()
36+
);
37+
}
38+
}
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
<?php
2-
3-
/**
4-
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5-
* Licensed under The MIT License
6-
* For full copyright and license information, please see the LICENSE.txt
7-
* Redistributions of files must retain the above copyright notice.
8-
*
9-
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10-
* @author Florian Krämer
11-
* @link https://github.com/Phauthentic
12-
* @license https://opensource.org/licenses/MIT MIT License
13-
*/
14-
15-
declare(strict_types=1);
16-
17-
namespace Phauthentic\Test\TestCase\Processor\Image;
18-
19-
use Intervention\Image\Image;
20-
use Intervention\Image\ImageManager;
21-
use Phauthentic\Infrastructure\Storage\File;
22-
use Phauthentic\Infrastructure\Storage\FileFactory;
23-
use Phauthentic\Infrastructure\Storage\FileStorageInterface;
24-
use Phauthentic\Infrastructure\Storage\PathBuilder\PathBuilder;
25-
use Phauthentic\Infrastructure\Storage\Processor\Image\ImageVariantCollection;
26-
use Phauthentic\Infrastructure\Storage\Processor\Image\ImageProcessor;
27-
use Phauthentic\Test\TestCase\TestCase;
28-
29-
/**
30-
* ImageProcessorTest
31-
*/
32-
class ImageProcessorTest extends TestCase
33-
{
34-
/**
35-
* @return void
36-
*/
37-
public function testProcessor(): void
38-
{
39-
$fileStorage = $this->getMockBuilder(FileStorageInterface::class)
40-
->getMock();
41-
42-
$pathBuilder = new PathBuilder();
43-
44-
$imageManager = $this->getMockBuilder(ImageManager::class)
45-
->getMock();
46-
47-
$image = $this->getMockBuilder(Image::class)
48-
->getMock();
49-
50-
$imageManager->expects($this->any())
51-
->method('make')
52-
->willReturn($image);
53-
54-
$processor = new ImageProcessor(
55-
$fileStorage,
56-
$pathBuilder,
57-
$imageManager
58-
);
59-
60-
$fileOnDisk = $this->getFixtureFile('titus.jpg');
61-
62-
$file = FileFactory::fromDisk($fileOnDisk, 'local')
63-
->withUuid('914e1512-9153-4253-a81e-7ee2edc1d973')
64-
->withFilename('foobar.jpg')
65-
->addToCollection('avatar')
66-
->belongsToModel('User', '1');
67-
68-
$collection = ImageVariantCollection::create();
69-
$collection
70-
->addNew('resizeAndFlip')
71-
->flipHorizontal()
72-
->resize(300, 300)
73-
->optimize();
74-
75-
$file = $file->withVariants($collection->toArray());
76-
77-
$file = $processor->process($file);
78-
79-
$this->assertInstanceOf(File::class, $file);
80-
}
81-
}
1+
<?php
2+
3+
/**
4+
* Copyright (c) Florian Krämer (https://florian-kraemer.net)
5+
* Licensed under The MIT License
6+
* For full copyright and license information, please see the LICENSE.txt
7+
* Redistributions of files must retain the above copyright notice.
8+
*
9+
* @copyright Copyright (c) Florian Krämer (https://florian-kraemer.net)
10+
* @author Florian Krämer
11+
* @link https://github.com/Phauthentic
12+
* @license https://opensource.org/licenses/MIT MIT License
13+
*/
14+
15+
declare(strict_types=1);
16+
17+
namespace Phauthentic\Test\TestCase\Processor\Image;
18+
19+
use Intervention\Image\Image;
20+
use Intervention\Image\ImageManager;
21+
use Phauthentic\Infrastructure\Storage\File;
22+
use Phauthentic\Infrastructure\Storage\FileFactory;
23+
use Phauthentic\Infrastructure\Storage\FileStorageInterface;
24+
use Phauthentic\Infrastructure\Storage\PathBuilder\PathBuilder;
25+
use Phauthentic\Infrastructure\Storage\Processor\Image\ImageVariantCollection;
26+
use Phauthentic\Infrastructure\Storage\Processor\Image\ImageProcessor;
27+
use Phauthentic\Test\TestCase\TestCase;
28+
29+
/**
30+
* ImageProcessorTest
31+
*/
32+
class ImageProcessorTest extends TestCase
33+
{
34+
/**
35+
* @return void
36+
*/
37+
public function testProcessor(): void
38+
{
39+
$fileStorage = $this->getMockBuilder(FileStorageInterface::class)
40+
->getMock();
41+
42+
$pathBuilder = new PathBuilder();
43+
44+
$imageManager = $this->getMockBuilder(ImageManager::class)
45+
->getMock();
46+
47+
$image = $this->getMockBuilder(Image::class)
48+
->getMock();
49+
50+
$imageManager->expects($this->any())
51+
->method('make')
52+
->willReturn($image);
53+
54+
$processor = new ImageProcessor(
55+
$fileStorage,
56+
$pathBuilder,
57+
$imageManager
58+
);
59+
60+
$fileOnDisk = $this->getFixtureFile('titus.jpg');
61+
62+
$file = FileFactory::fromDisk($fileOnDisk, 'local')
63+
->withUuid('914e1512-9153-4253-a81e-7ee2edc1d973')
64+
->withFilename('foobar.jpg')
65+
->addToCollection('avatar')
66+
->belongsToModel('User', '1');
67+
68+
$collection = ImageVariantCollection::create();
69+
$collection
70+
->addNew('resizeAndFlip')
71+
->flipHorizontal()
72+
->resize(300, 300)
73+
->optimize();
74+
75+
$file = $file->withVariants($collection->toArray());
76+
77+
$file = $processor->process($file);
78+
79+
$this->assertInstanceOf(File::class, $file);
80+
}
81+
}

0 commit comments

Comments
 (0)