Skip to content
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

fix verifyNeverInvoked with array params #119

Merged
merged 3 commits into from
Jan 31, 2017
Merged

fix verifyNeverInvoked with array params #119

merged 3 commits into from
Jan 31, 2017

Conversation

louvelmathieu
Copy link

This is a fix for verifyNeverInvoked when you use it with array (for function with multiple params)

Before the fix, something like this worked :

$user->verifyInvoked('setNameAndInfo',["Bob Jones", "Infos"]);
$user->verifyNeverInvoked('setNameAndInfo', ["Bob Jones", "Infos"]);


public function testverifyWithMutliplesParams()
{
$this->specify('works for instance proxy', function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected 1 space after FUNCTION keyword; 0 found

$user->setNameAndInfo("Bob Jones", "Infos");

// verify
$user->verifyInvoked('setNameAndInfo',["Bob Jones", "Infos"]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space found after comma in function call

$user->verifyNeverInvoked('setNameAndInfo', ["Bob Jones", "Infos"]);
// If i dont fail, my test fail
throw new fail('verifyNeverInvoked');
} catch (\Exception $e) {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Expected 1 newline after opening brace; 0 found
  • Closing brace must be on a line by itself

$user->verifyNeverInvoked('setName', "Bob Jones");
// If i dont fail, my test fail
throw new fail('verifyNeverInvoked');
} catch (\Exception $e) {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Expected 1 newline after opening brace; 0 found
  • Closing brace must be on a line by itself

$user->verifyNeverInvoked('setNameAndInfo', ["Bob Jones", "Infos"]);
// If i dont fail, my test fail
throw new fail('verifyNeverInvoked');
} catch (\Exception $e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected 1 newline after opening brace; 2 found

@louvelmathieu louvelmathieu changed the title fix verifyNeverInvoked with aray params fix verifyNeverInvoked with array params Jan 6, 2017
@sergeyklay sergeyklay merged commit b7f5c50 into Codeception:master Jan 31, 2017
@sergeyklay
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants