30 open-source projects similar to sebastianbergmann/phpunit-mock-objects, ranked by how many features they have in common. Compare stars, activity and what each one does to find the best Phpunit Mock Objects alternative.
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
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
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
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
Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes
Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit, functional, and acceptance testing. It serves as a tool for automating real desktop and mobile browsers via the WebDriver protocol and acts as a client for testing REST and SOAP APIs. The framework is distinguished by its support for Behavior-Driven Development, allowing users to write human-readable test specifications in Gherkin language to align technical tests with business requirements. It implements actor-based action mapping to connect these natural language steps to executabl
GoMock is a mocking framework for the Go programming language.
MockK is a Kotlin test double framework that creates mocks, spies, and relaxed mocks for unit testing, with support for final classes, static methods, and coroutines. It functions as a bytecode instrumentation library that modifies compiled class files at load time to intercept constructors, final methods, and static functions without source changes, and also provides dedicated libraries for constructor mocking and coroutine mocking. The framework is designed specifically for Kotlin, handling Kotlin-specific constructs like extension functions, singletons, and suspend functions. MockK disting
Instantiator is a PHP library designed to create class instances without invoking their constructors. It uses the PHP Reflection API to allocate objects in memory and initialize them in a predefined state, bypassing standard constructor logic. The project functions as a data hydration tool and a testing helper. It enables the population of PHP objects from external data sources by mapping values directly to properties, regardless of whether those properties are public, protected, or private. This capability allows for the generation of objects in specific internal states for unit tests withou
Powermock is a Java mocking framework and unit testing tool that uses bytecode manipulation to mock static methods, final classes, and private constructors. It includes a Java agent instrumentation tool and a reflection-based testing utility to bypass encapsulation and modify class behavior at runtime. The project distinguishes itself by providing the ability to intercept the instantiation of objects via the new keyword and simulate the behavior of core Java system classes and native methods. It can override final modifiers on classes and methods and bypass signature restrictions for classes
Util is a comprehensive development framework for .NET designed to implement layered architectures and domain driven design. It provides a toolkit of base classes and tools for building full stack applications, specifically focusing on the creation of backend admin frameworks and management interfaces. The project distinguishes itself through a boilerplate generator that produces the necessary types and classes to standardize repetitive architectural patterns. It also includes a micro-frontend orchestrator that enables the splitting of large frontend modules into independent projects for sepa
This project is a boilerplate and template for Go applications implementing Clean Architecture. It provides a standardized project structure designed to organize code into decoupled layers, ensuring that core business logic remains independent of databases, frameworks, and user interfaces. The implementation focuses on a domain-driven design that utilizes dependency injection and the repository pattern to abstract data storage. It enforces architectural boundaries through internal package encapsulation and layer-based dependency inversion. The project includes a development toolchain that au
CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web applications. It provides a lightweight toolkit with minimal configuration, organizing application logic into controllers, models, and views for clean separation of concerns. The framework includes a fluent query builder for constructing SQL statements programmatically, PSR-4 autoloading with namespace mapping, and a service-based dependency injection container for managing shared class instances. The framework distinguishes itself through its comprehensive set of built-in tools
SpringSide 4 is an enterprise Java reference architecture and utility library built on the Spring Framework. It provides a pragmatic, best-practice application stack for building RESTful web services, web applications, and data access layers, along with a curated collection of high-performance utility classes for common operations like text, date, collection, reflection, concurrency, and I/O handling. The project distinguishes itself by combining a complete reference application scaffold with production-oriented infrastructure. It includes a JPA-based data access layer that automatically tran
Moq is a .NET mocking framework and C# library used to create simulated objects and interfaces. Its primary purpose is to isolate code from external dependencies during unit testing by providing a system for interface simulation and behavioral testing. The framework distinguishes itself through the use of functional specification queries and LINQ-based querying to create declarative mocks. It supports the simulation of complex scenarios, including the automatic generation of recursive mock hierarchies, the implementation of multiple interfaces within a single mock instance, and the ability to
SwiftTips is a curated collection of guides, libraries, and design patterns focused on Swift language mastery, application architecture, and API design. It provides a technical resource for implementing advanced coding techniques and architectural best practices. The project emphasizes creating type-safe and conversational interfaces through strategic protocol composition and generics. It offers specialized patterns for building modular UI systems and managing complex view hierarchies, alongside comprehensive strategies for unit testing and dependency injection. The resource covers a broad s
Kiwi is a behavior-driven development framework and specification library for iOS. It functions as a wrapper for XCTest, allowing developers to define and execute software requirements as automated tests to verify application logic. The framework utilizes a domain-specific language to organize test cases into a nested hierarchy of descriptions. It includes a mocking system that employs runtime message interception and dynamic proxies to record invocations and return stubbed values. The system provides a fluent assertion interface to evaluate object states and uses a block-based engine to exe
xunit is a unit testing framework for the .NET ecosystem designed to execute isolated code units and report failures across multiple platforms. It functions as a data-driven test runner and a native AOT test suite, capable of verifying compiled binaries and standalone executables after ahead-of-time compilation. The framework utilizes build-time source generators for test discovery to define test cases without relying on runtime reflection. It also features an extensible reporting system where custom logic can be linked into test assemblies to output results in specialized formats. The proje
Pest is a testing framework for PHP that provides a comprehensive suite for executing unit, integration, and end-to-end tests. It functions as an automated testing tool that prioritizes developer experience and readability through a concise, expressive syntax for defining test suites. By wrapping an established testing foundation, it maintains compatibility with existing ecosystem tools while offering a specialized interface for writing and organizing automated tests. The framework distinguishes itself through integrated support for parallel test execution, which distributes suites across mul
This project is an educational platform and tutorial series designed to teach the Go programming language through the practice of test-driven development. It provides a structured path for developers to master language fundamentals, concurrency, and standard library usage by building functional applications in small, verifiable increments. The core methodology centers on the test-driven development cycle, where failing tests are written before implementation to define requirements and ensure code correctness. This approach is applied across a wide range of practical scenarios, including the c
This project is a detection-as-code framework providing a library of security monitoring rules and predefined detection content for Elasticsearch data indices. It serves as a threat detection rule library designed to identify malicious activity and attack patterns across diverse data streams in cloud and on-premises environments. The framework implements a detection engineering workflow where rules are defined in YAML and managed as versioned code. It includes a set of command-line utilities for automated rule deployment, metadata searching, and template generation, supported by a Python-base
Jest is a JavaScript testing framework that integrates a test runner, an assertion library, and a snapshot testing tool. Its primary purpose is to provide a comprehensive environment for writing and running automated JavaScript tests to verify software correctness. The framework is distinguished by its snapshot testing capabilities, which capture the state of large objects or rendered components to detect regressions over time. It also features a reactive watch mode that monitors file changes and automatically executes only the tests related to modified code. The project covers a broad range
This project is a Go language extension for VS Code that provides a comprehensive development environment through a language server client, a debugging interface, and a test automation runner. It integrates language intelligence, formatting, and debugging capabilities to support the full Go language development lifecycle. The extension distinguishes itself by managing the Go toolchain, including the installation and configuration of external binaries required for language features. It also features a dedicated test automation interface that allows for the generation of unit test skeletons and
go-sqlmock is a Go library that simulates SQL driver behavior for unit testing by intercepting database calls through the standard database/sql/driver interface, eliminating the need for a real database connection. It provides a comprehensive mocking framework that allows developers to define expectations for SQL operations, including queries, executions, prepared statements, and transaction lifecycles, with precise control over the results and errors returned. The library distinguishes itself through its flexible matching and verification capabilities. It supports regex-based or exact SQL
Sourcery is a code generation tool for Swift that automates the production of repetitive boilerplate and protocol conformance. It functions as a template engine that scans source files to generate structural code, such as Codable, Equatable, and Hashable implementations, based on marker protocols and static analysis. The project provides a specialized mocking framework that creates mock objects for protocols to track function calls and capture arguments during testing. It also includes utilities for generating struct lenses, enum case collections, and precise property-level test diffs. The s
This project is a language extension for VS Code that provides comprehensive Go language support. It functions as a language server client, a debugger interface, and a toolchain manager to facilitate Go application development. The extension distinguishes itself by integrating a full suite of toolchain management capabilities, allowing for the installation and configuration of required binaries, linters, and compiler versions directly within the editor. It also provides deep integration for interactive debugging via Delve, supporting remote target debugging, process attachment, and program st
This project is a set of software engineering standards and architectural patterns for writing maintainable and refactorable TypeScript code. It provides a comprehensive guide for implementing clean code principles, focusing on the application of SOLID design and structural patterns to build decoupled systems. The framework prioritizes composition over inheritance and utilizes dependency inversion to reduce system coupling. It establishes standards for strict static typing and the use of read-only modifiers to ensure type safety and eliminate runtime errors. The guidance covers a broad range
This repository provides a collection of reference implementations and patterns for testing Android applications. It serves as a guide for developers to integrate standard testing libraries and frameworks into their projects, covering the full spectrum of verification from local business logic to complex interface interactions. The project distinguishes itself by demonstrating how to configure and execute tests across diverse environments, including local virtual machines and physical devices or emulators. It provides specific patterns for validating inter-application communication, automatin
This repository contains the code exercises and answers that accompany the book Functional Programming in Scala. It is a structured learning resource designed to help readers build functional programming skills through hands-on coding practice, with exercises organized by chapter. The project provides a complete development workflow for learners, including the ability to compile and run Scala code directly from the command line using Scala CLI. It also includes unit tests for each exercise, allowing readers to verify their solutions and track their progress as they work through the material
Create React App is a comprehensive suite of tools for project bootstrapping, local development serving, unit testing, and production asset optimization. It functions as a React project bootstrapper and frontend build toolchain that generates a pre-configured development environment and folder structure. The project provides a local development server with live reloading and real-time error reporting, alongside a built-in test runner for executing unit tests and generating code coverage reports. It also includes a progressive web app template to implement service workers and web app manifests