fooman / phpunit-assert-bridge
Installs: 1 129
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- phpunit/phpunit: ~4.1.0 | ~4.8.0 | ~5.5.0 | ~6.5.0
This package is auto-updated.
Last update: 2024-10-25 13:46:03 UTC
README
The aim is to be able to write phpunit assertions for phpunit 6 and then be able to run these for Magento 2.3 and earlier (more accurately their associated phpunit versions).
Install with
composer require fooman/phpunit-assert-bridge --dev
and then instead of \PHPUnit\Framework\Assert
or \PHPUnit_Framework_Assert
use Fooman\PhpunitAssertBridge\CompatAssert
in both cases.
<?php
use Fooman\PhpunitAssertBridge\CompatAssert;
class MyTestCaseAssertion extends extends \Magento\Mtf\Constraint\AbstractConstraint
{
public function processAssert(
...
) {
CompatAssert::assertEquals('expected', $actual);
}
}