Skip to content

Way to test method call with params #32

Closed
@antonmarin

Description

@antonmarin

What are you trying to achieve?

Trying to test if method called with my params using Stub utility.

$db = Stub::make(
            Connection::className(), 
            [
                'quoteColumnName' => Stub::exactly(2, function($params){
                    return $params[0];
                }),
            ],
            $this
        );

What do you get instead?

No way or documentation to do it

Provide console output if related. Use -vvv mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

  • Codeception version:
  • PHP Version:
  • Operating System:
  • Installation type: Phar || Composer
  • List of installed packages (composer show)
  • Suite configuration:
# paste suite config here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions