EcomDev_PHPUnit icon indicating copy to clipboard operation
EcomDev_PHPUnit copied to clipboard

Controller Unit Test Improvements

Open Ig0r-M-magic42 opened this issue 7 years ago • 4 comments

While creating for another project a unit test for controller there appeared a problem: They were not starting, found problem at lib/EcomDev/PHPUnit/Mock/Proxy.php wich implements PHPUnit_Framework_MockObject_MockObject and is required to implement also function __phpunit_hasMatchers. I have raised a PR which fixes this issue.

Also my IDE shows following error screenshot from 2016-12-06 15 54 38. Fortunately for me this has not stopped testing controller

Ig0r-M-magic42 avatar Dec 06 '16 15:12 Ig0r-M-magic42

Apparently i don't have access to push so i will just post here what i have added. Hope this will help other

screenshot from 2016-12-06 15 57 31

Ig0r-M-magic42 avatar Dec 06 '16 15:12 Ig0r-M-magic42

@Ig0r-M Fork this repository, push your changes to forked repo and create a pull request from it to this one.

p-makowski avatar Dec 06 '16 16:12 p-makowski

@p-makowski thanks for clarifying. Raised PR #280 for this.

Ig0r-M-magic42 avatar Dec 06 '16 16:12 Ig0r-M-magic42

Regarding PHPStorm being noisy about method() to be implemented is related to https://github.com/sebastianbergmann/phpunit/issues/1680.

Ig0r-M-magic42 avatar Dec 06 '16 17:12 Ig0r-M-magic42