-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: AddAlbumRequestTest #3166
base: master
Are you sure you want to change the base?
Conversation
{ | ||
parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content); | ||
|
||
$this->albums = new Collection(); // initialize with empty collection to avoid error MergeAlbumsRequest::$albums must not be accessed before initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if i am doing this correctly, I was getting an error
MergeAlbumsRequest::$albums must not be accessed before initialization
when i comment this line and run MerglbRequestTest
4ddab40
to
40d4f92
Compare
40d4f92
to
89d0578
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
It took me a bit of time to understand why you wanted those. However this is not the best way to do it. |
{ | ||
parent::setUp(); | ||
$mockVerify = $this->createMock(VerifyInterface::class); | ||
App::instance(VerifyInterface::class, $mockVerify); // VerifyInterface is talking to DB & that is not needed for Request classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is not needed for Request classes
What do you mean ? :)
Just some unit tests