ergebnis/phpunit-framework-constraint

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides additional constraints and assertions for phpunit/phpunit

Maintainers

πŸ‘ localheinz

Package info

github.com/ergebnis/phpunit-framework-constraint

pkg:composer/ergebnis/phpunit-framework-constraint

Fund package maintenance!

localheinz

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

0.2.1 2019-12-15 10:32 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT deff3ea119fbfca4dd07d70792eae114b12e655d

  • Andreas MΓΆller <am.woop@localheinz.com>

phpunitassertionconstraint


README

πŸ‘ Integrate
πŸ‘ Prune
πŸ‘ Release
πŸ‘ Renew

πŸ‘ Code Coverage
πŸ‘ Type Coverage

πŸ‘ Latest Stable Version
πŸ‘ Total Downloads

Provides additional constraints for phpunit/phpunit.

Installation

Run

$ composer require ergebnis/phpunit-framework-constraint

Usage

Import the Ergebnis\PHPUnit\Framework\Constraint\Provider trait into your test class:

<?php

declare(strict_types=1);

namespace Foo\Bar\Test\Unit;

use Ergebnis\PHPUnit\Framework\Constraint\Provider;
use PHPUnit\Framework\TestCase;

final class BazTest extends TestCase
{
 use Provider;
}

Assertions

In addition to the assertions made available by extending from PHPUnit\Framework\TestCase, the Provider trait provides the following assertions:

  • assertJsonStringSameAsJsonString(string $expected, string $actual, string $message = ''): void

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.

Curious what I am building?

πŸ“¬ Subscribe to my list, and I will occasionally send you an email to let you know what I am working on.