How do you test your code ?

This page summarizes the projects mentioned and recommended in the original post on /r/PHP

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. http-kernel

    Provides a structured process for converting a Request into a Response

    In that regard, someone posted symfony's test suite as an example of good PHPUnit testing. The first file I clicked on demonstrated how worthless (IMO) unit testing can be: https://github.com/symfony/http-kernel/blob/v6.0.8/Tests/CacheClearer/ChainCacheClearerTest.php

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. Laravel

    Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

  4. Composer

    Dependency Manager for PHP

  5. Guzzle

    Guzzle, an extensible PHP HTTP client

  6. Amazon Web Service SDK

    Official repository of the AWS SDK for PHP (@awsforphp)

  7. Functional-core-imperative-shell

    Functional core imperative shell

    The pattern functional core, imperative shell will help you make bigger chunks of your code-base be unit testable without database or file scaffolding.

  8. Pest

    Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.

    Once you're comfortable with PHPUnit (Unit Testing and TDD) the next step is BDD (Behaviour-Driven Development). For this Behat is a good starting point. But my favourite was always Codeception because it has PHPUnit included and does everything (unit tests, functional test, integration tests). The only awkward part ro both of these is installing selenium (at least on windows) Pest is also becoming very popular among the Laravel community, but it will work with anything https://pestphp.com/

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. Symfony Panther

    A browser testing and web crawling library for PHP and Symfony

    For tools, I use PHPUnit, Symfony's PHPUnit helper classes, and Panther (for frontend/headless-browser testing, mostly JS behavior)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Any pro-tips for writing automated tests with Selenium PHP?

    3 projects | /r/PHP | 2 May 2023
  • Criando uma API simples com PHP puro

    6 projects | dev.to | 9 May 2024
  • Shopware Changes since the 6.0 Dev Training Videos

    5 projects | dev.to | 12 Dec 2023
  • Open Source Projects You Can Lay Your Hand On

    9 projects | /r/XBScompany | 6 Dec 2023
  • Testing an OpenAPI specification in PHP

    4 projects | dev.to | 29 Nov 2023

Did you know that PHP is
the 14th most popular programming language
based on number of references?