Comments (14)
Sorry about that… checking now.
from mockery.
Pushed a new tag 1.6.9
, pointing to the previous tag/commit 1.6.7
.
Please let me know if it resolves this issue and if there is anything else i need to do from my end.
from mockery.
1.6.9 resolved the issues for us at Laravel btw. Thanks!
from mockery.
Can confirm, tested the latest version on a private project, lots of failed tests, similar as shown in https://github.com/laravel/framework/actions/runs/8249377959/job/22561635869#step:8:178
from mockery.
Thanks!
from mockery.
Thanks - we'll take a look a bit later today.
from mockery.
Just as an additional note, I have a class Deliverable
that defines the __set
method. The test fails during the \Mockery::mock(...)
call because __set
of the mocked class calls a method, causing it to fail with
Mockery\Exception\BadMethodCallException: Received Mockery_5_App_Models_MyModel::setAttribute(), but no expectations were specified
/var/www/service/vendor/illuminate/database/Eloquent/Model.php:1539
/var/www/service/vendor/mockery/mockery/library/Mockery/Container.php:398
/var/www/service/vendor/mockery/mockery/library/Mockery.php:477
/var/www/service/tests/Services/Delivery/Dependency/ActionDependencyErrorTest.php:21
This might be the main cause of the breakages...
Edit: I can also confirm that 1.6.9
works again. Thank you very much for the fast response!
from mockery.
@ghostwriter can confirm, works for me, thank you 🫡
from mockery.
Let me know if you need testers for a new release with the changes you intended.
I mean, testing Laravel is easy, you can probably fork it, switch to your dev version in composer.json and see if it works.
I can also offer running it on a private code base (20k+ tests, lots-o-mockery) and see how it goes, if you let me know which version to test.
from mockery.
Hi @ghostwriter. Looks like all tests pass for us! laravel/framework#50643
from mockery.
I can confirm as well that all my tests work with that version.
from mockery.
Not to be the guy that re-opens a seemingly fixed issue, but since my issue is so similar in context I believe this is the place to report this.
Ever since 1.6.8 all my test suite fails. If I revert to 1.6.7 everything is fine.
On 1.6.8-1.6.11 I get multiple times this error :
Mockery\Exception\BadMethodCallException: Received Mockery_32_VMU_FileUpload::__construct(), but no expectations were specified
For each of my mocks used.
Is this an intended change ? Do I now need to set an expectation for __construct ? That seems a bit excessive and counter-productive.
from mockery.
Expectation check became more strict. For us it was expected array keys order and string / int mismatches.
from mockery.
Hey everyone,
we were able to test a fix for this issue in #1396 and it is now merged into 1.6.x
branch.
To test this branch,
you can use composer require mockery/mockery:1.6.x-dev --dev
or you can manually include the following in your composer.json
file:
"require-dev": {
"mockery/mockery":"1.6.x-dev"
}
And then run composer update
to fetch the latest changes from the 1.6.x
branch.
Please let me know if there are any issues when you run your tests.
I will wait for your feedback before creating the next 1.6.10
tag.
Thanks
from mockery.
Related Issues (20)
- support for PHPUnit constraints HOT 2
- Add "set property" method to mock object? HOT 1
- Disabled travis-ci and sensiolabs webhooks
- [New feature] Running code after mock method was called HOT 2
- InvalidCountException even though the mock method is called HOT 1
- [Feature request] Add array-like objects support to argument matchers
- PHP return type mismatch error when mocking method with static return type HOT 2
- Deprecations about drop support Metadata doc-comment in PHPUnit 12 HOT 2
- PHPStan error with mock method in 1.6.8 HOT 1
- Invalid `Mockery::mock()`/`spy()` phpdoc (= phpstan errors) HOT 6
- Issues with partial construction trait methods on 1.6.10 - change in behaviour HOT 1
- Cannot use 'false' as class name as it is reserved HOT 2
- Typings for setConstantsMap does not allow array HOT 1
- Mocking final classes reports unresolvable type by PHPStan HOT 1
- Error when mocking anonymous classes HOT 5
- Received `*::__construct()` but no expectations were specified HOT 1
- 1.6.12 typehint issue with spy methods HOT 2
- Mockery::spy gives wrong error when called with unmatched argument HOT 1
- Mockery::spy gives wrong error when called with unmatched argument
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mockery.