Skip to content

Releases: phpspec/prophecy

v1.4.1

27 Apr 22:15
Compare
Choose a tag to compare
  • Fixed bug in closure-based argument tokens (#181)

v1.4.0

27 Mar 19:31
Compare
Choose a tag to compare
  • Fixed errors in return type phpdocs (thanks @sobit)
  • Fixed stringifying of hash containing one value (thanks @avant1)
  • Improved clarity of method call expectation exception (thanks @dantleech)
  • Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart)
  • Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty)
  • Support for mocking classes with methods that return references (thanks @edsonmedina)
  • Improved object comparison (thanks @whatthejeff)
  • Adopted '^' in composer dependencies (thanks @GrahamCampbell)
  • Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff)
  • Magic methods are now filtered for keywords (thanks @seagoj)
  • More readable errors for failure when expecting single calls (thanks @dantleech)

Spies fix

24 Jan 11:04
Compare
Choose a tag to compare
  • Spy automatically promotes spied method call to an expected one

HHVM compatibility

15 Jan 15:07
Compare
Choose a tag to compare
  • Added support for HHVM

Improvements and bugfixes

01 Jan 21:24
Compare
Choose a tag to compare
  • Changed the generated class names to use a static counter instead of a random number
  • Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein)
  • Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein)
  • Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty)
  • Added support for properties in ObjectStateToken (thanks @adrienbrault)
  • Added support for mocking classes with a final constructor (thanks @ciaranmcnulty)
  • Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault)
  • Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein)
  • Added StringContainToken and Argument::containingString() (thanks @peterjmit)
  • Added shouldNotHaveBeenCalled on the MethodProphecy (thanks @ciaranmcnulty)
  • Fixed the comparison of objects in ExactValuetoken (thanks @sstok)
  • Deprecated shouldNotBeenCalled in favor of shouldNotHaveBeenCalled

1.0.4 - bugfix

10 Aug 11:12
Compare
Choose a tag to compare
  • Better randomness for generated class names (thanks @sstok)
  • Add support for interfaces into TypeToken and Argument::type() (thanks @sstok)
  • Add support for old-style (method name === class name) constructors (thanks @l3l0 for report)

1.0.3 - bugfix

04 Jul 20:07
Compare
Choose a tag to compare
  • Support callable typehints (thanks @stof)
  • Do not attempt to autoload arrays when generating code (thanks @marcodebortoli)
  • New ArrayEntryToken (thanks @kagux)

1.0.2 - logical argument operators

04 Jul 19:59
Compare
Choose a tag to compare
  • Logical AND token added (thanks @kagux)
  • Logical NOT token added (thanks @kagux)
  • Add support for setting custom constructor arguments
  • Properly stringify hashes
  • Record calls that throw exceptions
  • Migrate spec suite to PhpSpec 2.0

1.0.1 - bugfix

04 Jul 19:58
Compare
Choose a tag to compare
  • Fix broken UnexpectedCallException message
  • Trim AggregateException message

1.0.0 - going stable!

04 Jul 19:58
Compare
Choose a tag to compare
  • First stable release
  • Improve exception messages