Skip to content

$this->at(0) does not work #6

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

Closed
PascalMinder opened this issue Jan 18, 2016 · 1 comment
Closed

$this->at(0) does not work #6

PascalMinder opened this issue Jan 18, 2016 · 1 comment

Comments

@PascalMinder
Copy link

Is there any reason why this does not work?

$timeMock = $this->getFunctionMock(__NAMESPACE__, "time");

$timeMock->expects($this->at(0))
    ->willReturn(1);

$this->assertEquals(1, time());

$timeMock->expects($this->at(1))
    ->willReturn(4);

$this->assertEquals(4, time());
@PascalMinder
Copy link
Author

Wrong order of the setup.

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

No branches or pull requests

1 participant