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
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
TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP
This project is a Ruby unit testing tool designed for dependency isolation and behavioral contract verification. It functions as a comprehensive mocking framework that allows developers to replace real objects with controlled placeholders, ensuring that code interacts with its dependencies as expected during automated test execution. The framework distinguishes itself through its ability to perform partial double verification, which checks that stubbed methods exist on the underlying object to prevent tests from passing against incorrect interfaces. It also provides sophisticated constant man
Mockery is a PHP framework designed for creating test doubles, stubs, and spies to facilitate isolated unit testing. It serves as a utility for simulating class behavior, intercepting method calls, and validating arguments, allowing developers to replace real dependencies with mock objects to verify that code components interact as intended.
The main features of mockery/mockery are: Dependency Mocking, Mocking Frameworks, Interaction Verification Utilities, Unit Testing Frameworks, Static and Instantiation Interceptors, Test Suite Integrations, Interaction Spies, Testing and Quality.
Open-source alternatives to mockery/mockery include: mockito/mockito — Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls… phpspec/prophecy — Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing.… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… rspec/rspec-mocks — This project is a Ruby unit testing tool designed for dependency isolation and behavioral contract verification. It… sinonjs/sinon — Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit… vitest-dev/vitest — Vitest is a high-performance testing framework designed for JavaScript and TypeScript applications. It provides an…