PHP-Mock: mocking built-in PHP functions
Mock built-in PHP functions (e.g. time(), exec() or rand()) (by php-mock)
Alice
Expressive fixtures generator (by nelmio)
PHP-Mock: mocking built-in PHP functions | Alice | |
---|---|---|
2 | 1 | |
354 | 2,466 | |
0.6% | 0.1% | |
4.9 | 8.0 | |
3 months ago | 12 days ago | |
PHP | PHP | |
Do What The F*ck You Want To Public License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PHP-Mock: mocking built-in PHP functions
Posts with mentions or reviews of PHP-Mock: mocking built-in PHP functions.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-28.
-
Mock nested PHP default functions in PHPUnit tests
https://github.com/php-mock/php-mock - a testing library which mocks non deterministic built-in PHP functions;
-
need `ftell()` to return false for unittest
If you remove the \ from ftell($resource), you will be able to mock in in your unit tests. I created a mock function of it using a package called PHPMock. My unit test ended up looking like something like this:
Alice
Posts with mentions or reviews of Alice.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-09-10.
-
Hautelook's AliceBundle has disappeared :O
Some information from theofidry and a temporary solution > https://github.com/nelmio/alice/issues/1089
What are some alternatives?
When comparing PHP-Mock: mocking built-in PHP functions and Alice you can also consider the following projects:
Mockery - Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL).
Faker
AspectMock - The most powerful and flexible mocking framework for PHPUnit / Codeception.
hautelook.alice-bundle - An archive of hautelook/alice-bundle.
Codeception - Full-stack testing PHP framework
Kahlan - :heavy_check_mark: PHP Test Framework for Freedom, Truth, and Justice
PHPT - The PHP Interpreter
Prophecy - Highly opinionated mocking framework for PHP 5.3+
DBUnit
PHP-Mock: mocking built-in PHP functions vs Mockery
Alice vs Faker
PHP-Mock: mocking built-in PHP functions vs AspectMock
Alice vs hautelook.alice-bundle
PHP-Mock: mocking built-in PHP functions vs Faker
Alice vs Codeception
PHP-Mock: mocking built-in PHP functions vs Kahlan
Alice vs PHPT
PHP-Mock: mocking built-in PHP functions vs Prophecy
Alice vs DBUnit
PHP-Mock: mocking built-in PHP functions vs Codeception
Alice vs Mockery