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

Mock expectations shouldn't be allowed on not existent methods #26

Closed
giorgiosironi opened this issue Sep 21, 2010 · 2 comments
Closed

Comments

@giorgiosironi
Copy link
Contributor

I can't open a ticket on phpunit.de so I have to do it here, not know if this is the right place.

In PHPUnit 3.4.15, this test case:

getMock('DummyInterfaceWithoutMethods');
                $mock->expects($this->any())
                        ->method('doesNotExist')
                        ->will($this->returnValue('foo'));
        }
}
interface DummyInterfaceWithoutMethods {}

does not fail. If an error were raise, it will be simple to find mystakes and typos in method names.

@whatthejeff
Copy link
Contributor

This should probably be opened here: http://github.com/sebastianbergmann/phpunit-mock-objects instead.

@sebastianbergmann
Copy link
Owner

This issue was closed.
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

3 participants