EcomDev / EcomDev_PHPUnit

Magento PHPUnit Integration
http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html
Open Software License 3.0
299 stars 166 forks source link

Controller Unit Test Improvements #279

Open Ig0r-M-magic42 opened 7 years ago

Ig0r-M-magic42 commented 7 years ago

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 commented 7 years ago

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

p-makowski commented 7 years ago

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

Ig0r-M-magic42 commented 7 years ago

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

Ig0r-M-magic42 commented 7 years ago

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