PHP Classes

Notable PHP package: Doubles

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Viewers: 122

Last month viewers: 2

Categories: Notable Packages

One way to test applications based on classes that implement important behaviors is to create mock objects.

These are objects that behave like objects of the classes that you want to test but you can change them to make them behave according to the aspects that you want to test about the class features.

This package can be used to create mock objects by creating similar classes that have additional features that are useful for testing purposes like counting how many times among other features.

Read this article to learn more details about how this notable PHP package works.




Loaded Article
The package Doubles is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Create mock objects by doubling a given class

Here follows in more detail what it does:

This package can be used to create mock objects by doubling a given class.

It can take a given class reference as parameter and creates a dummy object of that class that can be used to test as a mock object. The mock object provides useful features like:

- Counting how many times an object method is called
- Check if the mock object is called with given values
- Make a given class function of the mock object return a specific value

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.




  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)