Closed askobara closed 5 years ago
confirmed. Your fix is valid :) Was about to send a similar PR.
Confirmed. Facing the same problem here.
I will use old version of specify
package which does not use this package while this PR is waiting for merge.
Accepting this PR would really be appreciated!
@DavertMik please have a look at this.
Confirmed! Running into the very same issue. Will be fixed with the proposed PR.
Confirmed, please have a look soon, it's already been quite long when PR is already available.
@DavertMik @diego-vieira
🐞
🐝 🐝 🐝
🐝 🐝 🐝 🐝 🐝
🐝 🐝 🐝 🐝 🐝 🐝 🐝
Waiting for this PR too...
Confirmed as well! Please can we get this PR merged asap. This is becoming a roadblock in our team flow 😞
In the meantime, I wrapped all the assertion stuff in a try-catch
block like the following:
$this->it(
"throws an exception",
function () {
$this->assertThrows(
\InvalidArgumentException::class,
function () {
try {
$this->unitUnderTest->functionUnderTest($param);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException();
}
}
);
}
);
This just strips the message from the exception. It's ugly and shouldn't be needed, but it does the trick until the PR is merged.
@DavertMik is there a reason this issue is neglected? If the library is no longer maintained, wouldn't it make sense to say so in the README?
There is an example to reproduce:
exception message '' was expected, but 'an exception' was received