awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
sebastianbergmann avatar

sebastianbergmann/phpunit-mock-objectsArchived

0
View on GitHub↗
4,934 estrellas·153 forks·PHP·1 vistaphpunit.de↗

Phpunit Mock Objects

Este proyecto es un framework de mocking y una librería diseñada para crear objetos simulados con el fin de aislar código y verificar interacciones durante las pruebas con PHPUnit. Sirve como un conjunto de herramientas para escribir y ejecutar pruebas automatizadas en PHP para garantizar la corrección del software.

La librería reemplaza las dependencias de objetos reales con dobles controlados para probar rutas de código específicas y simular comportamientos complejos de clases. Esto permite la verificación de la lógica dentro de clases PHP individuales mediante la simulación de las entradas y salidas de sus colaboradores.

El framework proporciona capacidades para la síntesis e interceptación de objetos en tiempo real, incluyendo generación dinámica de proxies, seguimiento de llamadas a métodos y stubbing de comportamiento. Admite la verificación basada en expectativas y la síntesis de clases concretas a partir de interfaces.

Features

  • Dynamic Mock Objects - Provides runtime generation of proxy objects to simulate dependencies and track interactions during unit tests.
  • Interaction Expectations - Provides verification of specific method calls, arguments, and invocation frequency to determine test success.
  • Method Stubbings - Allows defining custom return values or callbacks for mocked methods to simulate specific dependency behaviors.
  • Method Interception - Captures method arguments and return values to verify interactions between the system under test and its dependencies.
  • Mocking Frameworks - Provides a complete system for replacing real object dependencies with controlled doubles to test specific code paths.
  • PHP Testing Frameworks - Facilitates the verification of individual PHP classes by mocking the inputs and outputs of collaborator objects.
  • Unit Testing - Enables the creation of isolated unit tests by simulating complex dependencies within the PHPUnit environment.
  • Runtime Synthesized Implementations - Synthesizes concrete classes from interfaces at runtime to create mock objects for dependencies without existing implementations.
  • Method Interception Proxies - Implements dynamic proxy systems that intercept method calls to facilitate behavioral stubbing and verification.
  • Service Isolation Utilities - Ensures code is verified independently by removing dependencies on external services or databases through the use of doubles.
  • Reflection-Based Proxies - Uses PHP reflection to generate proxy classes at runtime that override original methods and track invocations.

Historial de estrellas

Gráfico del historial de estrellas de sebastianbergmann/phpunit-mock-objectsGráfico del historial de estrellas de sebastianbergmann/phpunit-mock-objects

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Preguntas frecuentes

¿Qué hace sebastianbergmann/phpunit-mock-objects?

Este proyecto es un framework de mocking y una librería diseñada para crear objetos simulados con el fin de aislar código y verificar interacciones durante las pruebas con PHPUnit. Sirve como un conjunto de herramientas para escribir y ejecutar pruebas automatizadas en PHP para garantizar la corrección del software.

¿Cuáles son las características principales de sebastianbergmann/phpunit-mock-objects?

Las características principales de sebastianbergmann/phpunit-mock-objects son: Dynamic Mock Objects, Interaction Expectations, Method Stubbings, Method Interception, Mocking Frameworks, PHP Testing Frameworks, Unit Testing, Runtime Synthesized Implementations.

¿Qué alternativas de código abierto existen para sebastianbergmann/phpunit-mock-objects?

Las alternativas de código abierto para sebastianbergmann/phpunit-mock-objects incluyen: phpspec/prophecy — Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing.… sebastianbergmann/phpunit — PHPUnit is a unit testing framework and automated testing tool for the PHP ecosystem. It provides a comprehensive… mockito/mockito — Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls… moq/moq4 — Moq4 is a .NET mocking framework used to create simulated implementations of interfaces and abstract classes. It… sinonjs/sinon — Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit… codeception/codeception — Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit,…

Alternativas open-source a Phpunit Mock Objects

Proyectos open-source similares, clasificados según cuántas características comparten con Phpunit Mock Objects.
  • phpspec/prophecyAvatar de phpspec

    phpspec/prophecy

    8,480Ver en GitHub↗

    Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing. It serves as a behavioral testing tool for creating mocks, stubs, and dummies to isolate code and ensure predictable test results. The framework enables interaction verification by tracking method call counts and arguments to validate that specific interactions occurred. It supports defining specific return values or custom logic for method calls to simulate various execution scenarios. The library provides capabilities for argument matching based on type or value, interactio

    PHP
    Ver en GitHub↗8,480
  • sebastianbergmann/phpunitAvatar de sebastianbergmann

    sebastianbergmann/phpunit

    20,033Ver en GitHub↗

    PHPUnit is a unit testing framework and automated testing tool for the PHP ecosystem. It provides a comprehensive suite for writing and running automated tests to verify the functional correctness of PHP code and identify software bugs. The framework supports both unit and end-to-end testing to validate individual code units and complete application workflows. It includes capabilities for automated regression testing and test suite management, allowing for the execution of targeted subsets of tests. The tool provides mechanisms for identifying flaky tests through automatic retries and test r

    PHP
    Ver en GitHub↗20,033
  • mockito/mockitoAvatar de mockito

    mockito/mockito

    15,432Ver en GitHub↗

    Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls to isolate components during unit tests. It functions as a dynamic proxy generator and bytecode instrumentation tool, allowing for the creation of runtime substitutes that mimic the behavior of real classes. The framework distinguishes itself by providing the ability to mock final classes and methods, bypassing standard language restrictions through bytecode modification. This capability enables the testing of legacy code that lacks interfaces. The toolset covers behavioral mo

    Java
    Ver en GitHub↗15,432
  • moq/moq4Avatar de Moq

    Moq/moq4

    6,387Ver en GitHub↗

    Moq4 is a .NET mocking framework used to create simulated implementations of interfaces and abstract classes. It serves as a test double generator and behavior verification tool, allowing developers to isolate code during unit testing by replacing real dependencies with programmed mocks. The framework enables the definition of expected method behaviors and return values to control the execution flow of tests. It provides specialized capabilities for simulating methods that use output or reference parameters and mechanisms to monitor and trigger events on simulated objects. The library includ

    C#
    Ver en GitHub↗6,387
  • Ver las 30 alternativas a Phpunit Mock Objects→