awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
hamcrest avatar

hamcrest/hamcrest-php

0
View on GitHub↗

Hamcrest Php

Hamcrest PHP is a declarative assertion framework and matcher library used for unit testing in PHP. It provides a set of flexible matchers to verify object states, data types, and collection contents.

The library includes specialized tools for XML verification using XPath expressions to analyze document structures and element content. It also allows for the creation of complex validation rules by combining multiple independent matchers through logical operators.

The framework covers a broad range of validation primitives, including string content inspection, numeric comparison, and object property verification. It also provides utilities for checking data types and validating the size and contents of arrays and traversable collections.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Features

  • PHP Data Assertion Tools - Provides a comprehensive set of assertion tools for verifying PHP values and nested object contents.
  • Object and Collection Assertions - Checks class inheritance, object properties, and the contents of traversable collections or arrays.
  • Object Member Assertions - Compares object instances by identity or value and verifies class inheritance.
  • Collection Size Assertions - Checks if traversable collections are empty or contain a specific number of elements.
  • Numeric Assertions - Evaluates numeric values based on equality, range proximity, and relative magnitude.
  • PHP Value Comparison Libraries - Provides a flexible library of matchers to check equality and specific criteria between complex PHP data types.
  • Collection Content Validations - Implements comprehensive checks for element presence, count, and ordering within PHP arrays and collections.
  • Unit Testing Utilities - Implements a declarative API for validating object states, data types, and collection contents during unit testing.
  • String Assertions - Implements specialized matchers for analyzing string content, substrings, and patterns.
  • Type Assertions - Includes utilities to verify that values match specific scalar or compound data types.
  • Unit Testing Frameworks - Provides a library for defining and executing automated assertions to verify code logic and correctness.
  • String Pattern Validators - Provides utilities for verifying PHP strings against regular expression patterns, substrings, and equality.
  • XML XPath Matchers - Provides specialized tools for XML verification using XPath expressions to analyze document structures.
  • Composite Assertion Matchers - Implements complex validation rules by nesting simple matcher objects within logical operator objects.
  • XML Verification Matchers - Uses XPath expressions to analyze and verify the structure and content of XML documents in PHP applications.
  • Assertion Logic Combinators - Provides capabilities to combine multiple independent matchers using logical AND and OR operations for complex validation.
  • Assertion Matchers - Provides a system for grouping multiple matchers using logical operators to create complex validation rules.
  • XPath Assertions - Provides specialized matchers to analyze and verify XML document structures using XPath expressions.
7,007 stars·46 forks·PHP·16 views

Star history

Star history chart for hamcrest/hamcrest-phpStar history chart for hamcrest/hamcrest-php

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

Frequently asked questions

What does hamcrest/hamcrest-php do?

Hamcrest PHP is a declarative assertion framework and matcher library used for unit testing in PHP. It provides a set of flexible matchers to verify object states, data types, and collection contents.

What are the main features of hamcrest/hamcrest-php?

The main features of hamcrest/hamcrest-php are: PHP Data Assertion Tools, Object and Collection Assertions, Object Member Assertions, Collection Size Assertions, Numeric Assertions, PHP Value Comparison Libraries, Collection Content Validations, Unit Testing Utilities.

Which projects share features with hamcrest/hamcrest-php?

Projects with overlapping indexed features include: thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… sebastianbergmann/comparator — This library is a data assertion tool and equality logic framework for PHP. It provides utilities to verify that two… junit-team/junit4 — JUnit 4 is a unit testing framework for Java that provides a structured approach to writing and running automated… assertj/assertj — AssertJ is a Java assertion library and fluent interface testing framework. It provides a toolkit for verifying object… doctrine/instantiator — Instantiator is a PHP library designed to create class instances without invoking their constructors. It uses the PHP… asaskevich/govalidator — [Go] Package of validators and sanitizers for strings, numerics, slices and structs.

Projects sharing features with Hamcrest Php

These projects share indexed features with Hamcrest Php. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • thomhurst/tunitthomhurst avatar

    thomhurst/TUnit

    3,744View on GitHub↗

    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

    C#csharpdotnettest
    View on GitHub↗3,744
  • sebastianbergmann/comparatorsebastianbergmann avatar

    sebastianbergmann/comparator

    7,053View on GitHub↗

    This library is a data assertion tool and equality logic framework for PHP. It provides utilities to verify that two values, nested objects, or complex data types match based on their internal contents. The project distinguishes itself through the use of custom matching rules and configurable precision. It allows for the comparison of floating point numbers and dates using a defined margin of error to account for numeric precision loss. The framework covers deep value equality verification across scalars, arrays, and nested objects. It implements strict type enforcement to prevent implicit c

    PHP
    View on GitHub↗7,053
  • junit-team/junit4junit-team avatar

    junit-team/junit4

    8,525View on GitHub↗

    JUnit 4 is a unit testing framework for Java that provides a structured approach to writing and running automated tests. At its core, it uses annotation-based test discovery to automatically identify test methods, and a pluggable runner architecture that controls how test classes are discovered, instantiated, and executed. The framework builds test execution around a chain of Statement objects, each wrapping the next to layer behaviors such as timeouts and retries, and uses Java reflection to dynamically invoke test methods and access private fields for setup and teardown operations. The fram

    Java
    View on GitHub↗8,525
  • assertj/assertjassertj avatar

    assertj/assertj

    2,827View on GitHub↗

    AssertJ is a Java assertion library and fluent interface testing framework. It provides a toolkit for verifying object states using a chainable syntax designed to make test assertions descriptive and readable. The library functions as a type-specific Java verifier, offering specialized assertion methods for strings, collections, maps, and complex object graphs. It utilizes type-specific assertion classes to provide validation methods relevant to the specific data structure being tested. The framework covers a broad range of quality assurance capabilities, including object state verification

    Javaassertionsassertjgroovy
    View on GitHub↗2,827
Compare all 30 related projects→