SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 PHP PHPunit Projects
-
PHPUnit: PHPUnit PHPUnit is a testing framework for PHP. It enables developers to write unit tests, integration tests, and functional tests to verify the correctness of their code. It offers a wide range of assertions, test runners, and mocking capabilities. Documentation: Explore PHPUnit's capabilities and learn how to write effective tests in the official documentation: PHPUnit Repository
-
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).
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
-
-
PHP VCR
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
-
doctrine-test-bundle
Symfony bundle to isolate your app's doctrine database tests and improve the test performance
Project mention: Just started with Symfony after Laravel, and wanted to ask you guys, how to use database in testing, like in Laravel with Factories for generating own data for each test and database trait for purging data after each test? | /r/symfony | 2022-08-22If you want to reset the state of the database after each test: https://github.com/dmaicher/doctrine-test-bundle
-
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Project mention: How Are Y'All Unit Testing Your WordPress Code (If You Are) | /r/ProWordPress | 2023-03-11
There is an effort called WP_Mock started by GoDaddy which attempts to mock the WordPress API, thus doing what I just accused the official version of testing of getting wrong. And this also feels wrong. Running tests against a mock of WordPress' API feels insufficient except for the simplest cases. Also if I'm not actually "testing against WordPress" I don't get the benefits of the official way, like being able to easy test against future and past versions of WordPress. I'm just testing against whatever version the mock attempts to replicate.
-
-
bypass-finals
Removes final keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.
It definitely is my job. If you feel you should ignore best practices and author's opinion, use something like this: https://github.com/dg/bypass-finals
-
-
-
Project mention: How Are Y'All Unit Testing Your WordPress Code (If You Are) | /r/ProWordPress | 2023-03-11
Check out brain monkey - it is my preferred mocking utility these days instead of WP_Mock.
-
-
It's a pity that your project has a name clash with another project that does the exact same thing... https://github.com/indentno/phpunit-pretty-print
-
PHPUnit-Polyfills
Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests
Project mention: How Are Y'All Unit Testing Your WordPress Code (If You Are) | /r/ProWordPress | 2023-03-11Check out the phpunit-polyfills package. This is pretty much a must if you want to test much older wordpress and php versions.
-
https://github.com/php-mock/php-mock-phpunit - integrates the function mock library PHP-Mock with PHPUnit;
-
-
wp-phpunit
WordPress core PHPUnit library. [READ ONLY] Versions for new WordPress releases are built daily.
Project mention: How Are Y'All Unit Testing Your WordPress Code (If You Are) | /r/ProWordPress | 2023-03-11First and foremost - I prefer end to end testing with tools like cypress or phpunit+browserkit over integration testing with the core test suite you linked. If I do reach for the core test suite lately I like the wp-phpunit package instead of the script you get from the wp-cli scaffolding.
-
phpunit-injector
Injects services from a PSR-11 dependency injection container to PHPUnit test cases
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
PHP PHPunit related posts
- Public or private by default, what to choose?
- I created a PHPUnit 10 extension to prettify CLI output
- A PHPUnit 10 extension to enforce minimum code coverage by using the clover XML
- How Are Y'All Unit Testing Your WordPress Code (If You Are)
- Using github actions to execute your PHP tests after every push
- 7 Powerful Tools to Simplify Laravel Developers' Life
- A minimalist template engine.
-
A note from our sponsor - #<SponsorshipServiceOld:0x00007f0920ea1048>
www.saashub.com | 3 Jun 2023
Index
What are some of the best open-source PHPunit projects in PHP? This list will help you:
Project | Stars | |
---|---|---|
1 | PHPUnit | 19,117 |
2 | Mockery | 10,409 |
3 | Codeception | 4,676 |
4 | php-ddd-example | 2,632 |
5 | PHP VCR | 1,088 |
6 | doctrine-test-bundle | 972 |
7 | phpunit-watcher | 830 |
8 | wp_mock | 622 |
9 | Phake | 477 |
10 | bypass-finals | 374 |
11 | laravel-vue-crud-starter | 363 |
12 | guzzler | 274 |
13 | BrainMonkey | 271 |
14 | Steward | 221 |
15 | phpunit-pretty-print | 174 |
16 | PHPUnit-Polyfills | 156 |
17 | php-mock-phpunit | 150 |
18 | paraunit | 122 |
19 | wp-phpunit | 69 |
20 | phpunit-injector | 63 |
21 | PHP Noise | 52 |
22 | phpunit-extras | 49 |
23 | phpunit-architecture-test | 38 |