slimphp / Slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
http://slimframework.com
MIT License
11.94k stars 1.95k forks source link

Mock method #1718

Closed iolloyd closed 8 years ago

iolloyd commented 8 years ago

https://github.com/slimphp/Slim/blob/3.x/Slim%2FInterfaces%2FHttp%2FEnvironmentInterface.php#L19

Is this method only for testing, and If so, would an extended interface in tests make more sense?

designermonkey commented 8 years ago

If I remember rightly, the method is only for testing. When we initially put the interfaces together, we just listed all the required functionality.

I reckon we don't even need the method to be defined in the interface at all, or even an extension of it as testing is testing and the method is not required to reproduce functionality in application specific derivatives.

silentworks commented 8 years ago

Yeah we should be able to get rid of that, but can't at the moment because of BC breaks it would cause. We are bound by that Contract for this moment.