awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
sebastianbergmann avatar

sebastianbergmann/phpunit-mock-objectsArchived

0
View on GitHub↗
4,934 Stars·153 Forks·PHP·1 Aufrufphpunit.de↗

Phpunit Mock Objects

Dieses Projekt ist ein Mocking-Framework und eine Bibliothek, die für die Erstellung simulierter Objekte entwickelt wurde, um Code zu isolieren und Interaktionen während PHPUnit-Tests zu verifizieren. Es dient als Toolset zum Schreiben und Ausführen automatisierter Tests in PHP, um die Korrektheit der Software sicherzustellen.

Die Bibliothek ersetzt echte Objektabhängigkeiten durch kontrollierte Doubles, um spezifische Codepfade zu testen und komplexe Klassenverhalten zu simulieren. Dies ermöglicht die Verifizierung der Logik innerhalb einzelner PHP-Klassen durch das Mocken der Ein- und Ausgaben ihrer Kollaborateure.

Das Framework bietet Funktionen für die Laufzeit-Objektsynthese und -interzeption, einschließlich dynamischer Proxy-Generierung, Methodenaufruf-Tracking und verhaltensbasiertem Stubbing. Es unterstützt erwartungsbasierte Verifizierung und die Synthese konkreter Klassen aus Schnittstellen.

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.

Star-Verlauf

Star-Verlauf für sebastianbergmann/phpunit-mock-objectsStar-Verlauf für sebastianbergmann/phpunit-mock-objects

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Phpunit Mock Objects

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Phpunit Mock Objects.
  • phpspec/prophecyAvatar von phpspec

    phpspec/prophecy

    8,480Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗8,480
  • sebastianbergmann/phpunitAvatar von sebastianbergmann

    sebastianbergmann/phpunit

    20,033Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗20,033
  • mockito/mockitoAvatar von mockito

    mockito/mockito

    15,432Auf GitHub ansehen↗

    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
    Auf GitHub ansehen↗15,432
  • moq/moq4Avatar von Moq

    Moq/moq4

    6,387Auf GitHub ansehen↗

    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#
    Auf GitHub ansehen↗6,387
Alle 30 Alternativen zu Phpunit Mock Objects anzeigen→

Häufig gestellte Fragen

Was macht sebastianbergmann/phpunit-mock-objects?

Dieses Projekt ist ein Mocking-Framework und eine Bibliothek, die für die Erstellung simulierter Objekte entwickelt wurde, um Code zu isolieren und Interaktionen während PHPUnit-Tests zu verifizieren. Es dient als Toolset zum Schreiben und Ausführen automatisierter Tests in PHP, um die Korrektheit der Software sicherzustellen.

Was sind die Hauptfunktionen von sebastianbergmann/phpunit-mock-objects?

Die Hauptfunktionen von sebastianbergmann/phpunit-mock-objects sind: Dynamic Mock Objects, Interaction Expectations, Method Stubbings, Method Interception, Mocking Frameworks, PHP Testing Frameworks, Unit Testing, Runtime Synthesized Implementations.

Welche Open-Source-Alternativen gibt es zu sebastianbergmann/phpunit-mock-objects?

Open-Source-Alternativen zu sebastianbergmann/phpunit-mock-objects sind unter anderem: 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,…