Closed pionl closed 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
Another search replace (with regex):
array_values\(array_filter\(\$([\w]+)\)\)\);
to
\$$1\);
BREAKING CHANGE: Due the changes the expectation logic has been changed and you need to update your code:
LaraStrict\Testing\AbstractExpectationCallsMap
moved toLaraStrict\Testing\Assert\AbstractExpectationCallsMap
parent::construct()
the the constructor - Add missing|null
to expectations phpdoc if missing - Removearray_values(array_filter(
usage (not required) - Example src/Testing/Context/Contracts/ContextServiceContractAssert.phpLaraStrict\Testing\AbstractExpectationCallMap
was removed in favor ofAbstractExpectationCallsMap
- example of change:src/Testing/Database/Contracts/SafeUniqueSaveActionContractAssert.php
- Extend AbstractExpectationCallsMap - Add constructor method and call parent - Addarray $expectations = []
to the constructor - Move template value from@extends
to phpdoc for $expectations - Remove@extends
phpdocAdd expectation class to
getExpectation call
AssertExpectationTestCase
orAssertExpectationManagerTrait