Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Throw exception when there are assertions for a not mocked method #184

Closed
JeroenDeDauw opened this issue Jul 6, 2014 · 1 comment
Closed

Comments

@JeroenDeDauw
Copy link
Sponsor Contributor

The below code fails since the method in question is concrete and does not get mocked. That is expected behaviour of the API. However, at least when this type of error occurs as in this example, the issue might not be at all obvious.

$platform = $this->getMock('Doctrine\DBAL\Platforms\AbstractPlatform');

$collector = new DropSchemaSqlCollector($platform);

$platform->expects($this->exactly(2))
    ->method('getDropForeignKeySQL');

Throwing an exception or providing a warning of some kind to the developer would be great.

@sebastianbergmann
Copy link
Owner

Dear contributor,

let me start by apologizing for not commenting and/or working on the issue you have reported or merging the pull request you have sent sooner.

PHPUnit 5.0 was released today. And today I am closing all open bug reports and pull requests for PHPUnit and its dependencies that I maintain. Please do not interpret the closing of this ticket as an insult or a lack of interest in your problem. I am sorry for any inconvenience this may cause.

If the topic of this ticket is still relevant then please open a new ticket or send a new pull request. If your ticket or pull request is about a defect then please check whether the issue still exists in PHPUnit 4.8 (which will received bug fixes until August 2016). If your ticket or pull request is about a new feature then please port your patch PHPUnit 5.0 before sending a new pull request.

I hope that today's extreme backlog grooming will allow me to respond to bug reports and pull requests in a more timely manner in the future.

Thank you for your understanding,
Sebastian

Repository owner locked and limited conversation to collaborators Oct 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants