Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1025 from fabianbloching/2.0
[Post-Processors] Replaced ProcessBuilder with Process and add additional tests
- Loading branch information
Showing
9 changed files
with
123 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#!/bin/sh |
23 changes: 23 additions & 0 deletions
23
Tests/Imagine/Filter/PostProcessor/JpegOptimPostProcessorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Liip\ImagineBundle\Tests\Imagine\Filter\PostProcessor; | ||
|
||
use Liip\ImagineBundle\Binary\BinaryInterface; | ||
use Liip\ImagineBundle\Imagine\Filter\PostProcessor\JpegOptimPostProcessor; | ||
use Liip\ImagineBundle\Model\Binary; | ||
use Liip\ImagineBundle\Tests\AbstractTest; | ||
|
||
class JpegOptimPostProcessorTest extends AbstractTest | ||
{ | ||
public function testJpegOptimPostProcessor() | ||
{ | ||
$jpegOptimPostProcessor = new JpegOptimPostProcessor( | ||
__DIR__.'/../../../Fixtures/bash/empty-command.sh' | ||
); | ||
|
||
$binary = new Binary('content', 'image/jpg', 'jpg'); | ||
$result = $jpegOptimPostProcessor->process($binary); | ||
|
||
$this->assertInstanceOf(BinaryInterface::class, $result); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Tests/Imagine/Filter/PostProcessor/MozJpegPostProcessorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Liip\ImagineBundle\Tests\Imagine\Filter\PostProcessor; | ||
|
||
use Liip\ImagineBundle\Binary\BinaryInterface; | ||
use Liip\ImagineBundle\Imagine\Filter\PostProcessor\MozJpegPostProcessor; | ||
use Liip\ImagineBundle\Model\Binary; | ||
use Liip\ImagineBundle\Tests\AbstractTest; | ||
|
||
class MozJpegPostProcessorTest extends AbstractTest | ||
{ | ||
public function testMozJpegPostProcessor() | ||
{ | ||
$mozJpegPostProcessor = new MozJpegPostProcessor( | ||
__DIR__.'/../../../Fixtures/bash/empty-command.sh' | ||
); | ||
|
||
$binary = new Binary('content', 'image/jpg', 'jpg'); | ||
$result = $mozJpegPostProcessor->process($binary); | ||
|
||
$this->assertInstanceOf(BinaryInterface::class, $result); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Tests/Imagine/Filter/PostProcessor/OptiPngPostProcessorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Liip\ImagineBundle\Tests\Imagine\Filter\PostProcessor; | ||
|
||
use Liip\ImagineBundle\Binary\BinaryInterface; | ||
use Liip\ImagineBundle\Imagine\Filter\PostProcessor\OptiPngPostProcessor; | ||
use Liip\ImagineBundle\Model\Binary; | ||
use Liip\ImagineBundle\Tests\AbstractTest; | ||
|
||
class OptiPngPostProcessorTest extends AbstractTest | ||
{ | ||
public function testJpegOptimPostProcessor() | ||
{ | ||
$optiPngPostProcessor = new OptiPngPostProcessor( | ||
__DIR__.'/../../../Fixtures/bash/empty-command.sh' | ||
); | ||
|
||
$binary = new Binary('content', 'image/png', 'png'); | ||
$result = $optiPngPostProcessor->process($binary); | ||
|
||
$this->assertInstanceOf(BinaryInterface::class, $result); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Tests/Imagine/Filter/PostProcessor/PngquantPostProcessorTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Liip\ImagineBundle\Tests\Imagine\Filter\PostProcessor; | ||
|
||
use Liip\ImagineBundle\Binary\BinaryInterface; | ||
use Liip\ImagineBundle\Imagine\Filter\PostProcessor\PngquantPostProcessor; | ||
use Liip\ImagineBundle\Model\Binary; | ||
use Liip\ImagineBundle\Tests\AbstractTest; | ||
|
||
class PngquantPostProcessorTest extends AbstractTest | ||
{ | ||
public function testPngquantPostProcessor() | ||
{ | ||
$pngquantPostProcessor = new PngquantPostProcessor( | ||
__DIR__.'/../../../Fixtures/bash/empty-command.sh' | ||
); | ||
|
||
$binary = new Binary('content', 'image/png', 'png'); | ||
$result = $pngquantPostProcessor->process($binary); | ||
|
||
$this->assertInstanceOf(BinaryInterface::class, $result); | ||
} | ||
} |