phpspec / prophecy

Highly opinionated mocking framework for PHP 5.3+
MIT License
8.53k stars 240 forks source link

String representation of values in argument tokens should not call __toString on doubles #163

Open stof opened 9 years ago

stof commented 9 years ago

The string representation of tokens can currently trigger unexpected calls to doubles for classes implementing __toString. This creates errors which are very hard to debug. The StringUtil should detect prophecy doubles and avoid calling __toString on them.

Einenlum commented 9 years ago

:+1:

raftalks commented 9 years ago

Looking forward to a solution, :+1:

gquemener commented 4 years ago

Hello,

As phpspec/prophecy:1.9.0 handles non stubbed __toString calls differently, shouldn't this issue be closed?