Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement interlace filter #503

Merged
merged 1 commit into from
Jan 8, 2015
Merged

implement interlace filter #503

merged 1 commit into from
Jan 8, 2015

Conversation

wodka
Copy link
Contributor

@wodka wodka commented Sep 26, 2014

Idea from #474

public function load(ImageInterface $image, array $options = array())
{
$mode = ImageInterface::INTERLACE_LINE;
if (empty($options['mode'])) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be if (!empty($options['mode'])) { I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed it.

@makasim
Copy link
Collaborator

makasim commented Sep 30, 2014

great, could you please add some tests?

@makasim
Copy link
Collaborator

makasim commented Oct 22, 2014

would you be able to add some tests?

@wodka
Copy link
Contributor Author

wodka commented Oct 23, 2014

hi, what do you want me to test in this case? I'll try to do it then as soon as possible.

@makasim
Copy link
Collaborator

makasim commented Oct 23, 2014

well the unit tests for InterlaceFilterLoader that it implements exepcted interface and that method interpolate is called when needed with expected parameters.

also you can add an integration test to tests that the filter service is available and could be fetched

@lsmith77 lsmith77 added the Level: New Feature 🆕 This item involves the introduction of new functionality. label Jan 8, 2015
@lsmith77
Copy link
Contributor

lsmith77 commented Jan 8, 2015

ping

@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

is there an example for the test?

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

is there an example for the test?

there are many test cases in Tests folder. You can look at them

@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

ok :/ can you help me with this? how to I pass a Mock Object to check if it will be called to the InterlaceFilter?

Argument 1 passed to Liip\ImagineBundle\Imagine\Filter\Loader\InterlaceFilterLoader::load() must implement interface Imagine\Image\ImageInterface, instance of Mock_ImagineInterface_23d0ec1d given, called in /home/travis/build/liip/LiipImagineBundle/Tests/Imagine/Filter/Loader/InterlaceFilterLoaderTest.php on line 24 and defined

{
public function testLoad()
{
$interlace = new InterlaceFilterLoader();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$loader

@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

thx - should I then squash the changes to one commit?

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

@wodka yes please (:

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

@wodka could you please add a func test like this one /~https://github.com/liip/LiipImagineBundle/blob/master/Tests/Functional/Imagine/FilterManagerTest.php#L8 to make sure the service is configured correctly and could be get from container.

@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

should I also move the DataManagerTest & FilterManagerTest into the corresponding Subfolders?

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

should I also move the DataManagerTest & FilterManagerTest into the corresponding Subfolders?

what do you mean? aren't they where they should be?

@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

Right now they are in Imagine Folder, but should be in the corresponding subfolder.

Tests/Functional/Imagine/DataManagerTest -> Tests/Functional/Imagine/Data/DataManagerTest
Tests/Functional/Imagine/FilterManagerTest -> Tests/Functional/Imagine/Filter/FilterManagerTest

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

yes, you are right! Let's move them

* add functional and unit test
* move functional tests (DataManager and FilterManager) to subfolders
@wodka
Copy link
Contributor Author

wodka commented Jan 8, 2015

@makasim moved the files + squashed the commits :)

makasim added a commit that referenced this pull request Jan 8, 2015
implement interlace filter
@makasim makasim merged commit 7e71457 into liip:master Jan 8, 2015
@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

Thanks for your patience

@makasim
Copy link
Collaborator

makasim commented Jan 8, 2015

wodka added a commit to wodka/LiipImagineBundle that referenced this pull request Jan 8, 2015
I missed the closing tag in my earlier pull request liip#503
@wodka wodka mentioned this pull request Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Level: New Feature 🆕 This item involves the introduction of new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants