Codeception / Codeception/Stub

Ability to specify the arguments of Generator::getMock like $callOriginalClone, $callAutoload, ...etc.

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
301
Forks
19
PR merge metrics
No merged PRs in 30d

Description

So far, we cannot specify the third and subsequent arguments of [Generator::getMock](https://github.com/sebastianbergmann/phpunit-mock-objects/blob/0dfddc236629eb7ead4df2dfa3d79d548e011a3b/src/Generator.php#L79).
It causes unexpected result in some case, i.e. `$cloneArguments` is always true so comparison like `with` would be failed like the issue below:
https://github.com/sebastianbergmann/phpunit-mock-objects/issues/348

Is it possible to specify those parameters by Codeception's Stub?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Generator::getMock in the linked PHPUnit mock-objects source and trace how Codeception's Stub passes arguments to it. Support specifying the third and subsequent parameters, including clone and autoload options, then verify that argument comparisons such as with no longer fail because clone arguments are forced on.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.