-
Notifications
You must be signed in to change notification settings - Fork 380
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
Conversation
public function load(ImageInterface $image, array $options = array()) | ||
{ | ||
$mode = ImageInterface::INTERLACE_LINE; | ||
if (empty($options['mode'])) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, fixed it.
great, could you please add some tests? |
would you be able to add some tests? |
hi, what do you want me to test in this case? I'll try to do it then as soon as possible. |
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 |
ping |
is there an example for the test? |
there are many test cases in Tests folder. You can look at them |
ok :/ can you help me with this? how to I pass a Mock Object to check if it will be called to the InterlaceFilter?
|
{ | ||
public function testLoad() | ||
{ | ||
$interlace = new InterlaceFilterLoader(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$loader
thx - should I then squash the changes to one commit? |
@wodka yes please (: |
@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. |
should I also move the DataManagerTest & FilterManagerTest into the corresponding Subfolders? |
what do you mean? aren't they where they should be? |
Right now they are in Imagine Folder, but should be in the corresponding subfolder. Tests/Functional/Imagine/DataManagerTest -> Tests/Functional/Imagine/Data/DataManagerTest |
yes, you are right! Let's move them |
* add functional and unit test * move functional tests (DataManager and FilterManager) to subfolders
@makasim moved the files + squashed the commits :) |
Thanks for your patience |
I missed the closing tag in my earlier pull request liip#503
Idea from #474