wrk-flow / larastrict

Opinionated extension of a Laravel framework to help you build type safe, testable and reusable code.
https://larastrict.com
MIT License
5 stars 2 forks source link

feat(Testing) AssertExpectations automatically checks if expectations were called #40

Closed pionl closed 1 year ago

pionl commented 1 year ago

BREAKING CHANGE: Due the changes the expectation logic has been changed and you need to update your code:

pionl commented 1 year ago

To add construct use search & replace:

from

) {
        $this->setExpectations

to

) {
        parent::__construct(); 
        $this->setExpectations

To fix AbstractExpectationCallsMap movement use search & replace:

\LaraStrict\Testing\AbstractExpectationCallsMap

to

\LaraStrict\Testing\Assert\AbstractExpectationCallsMap
pionl commented 1 year ago

Another search replace (with regex):

array_values\(array_filter\(\$([\w]+)\)\)\);

to

\$$1\);