fooman / phpunit-assert-bridge
v0.5.2
2018-11-24 23:44 UTC
Requires
- phpunit/phpunit: ~4.1.0 | ~4.8.0 | ~5.5.0 | ~6.5.0
This package is auto-updated.
Last update: 2024-08-25 13:34:26 UTC
README
目标是能够为phpunit 6编写断言,然后能够在Magento 2.3及更早版本(更准确地说,它们相关的phpunit版本)上运行这些断言。
安装方式
composer require fooman/phpunit-assert-bridge --dev
然后,在两种情况下,使用 Fooman\PhpunitAssertBridge\CompatAssert
替代 \PHPUnit\Framework\Assert
或 \PHPUnit_Framework_Assert
。
<?php
use Fooman\PhpunitAssertBridge\CompatAssert;
class MyTestCaseAssertion extends extends \Magento\Mtf\Constraint\AbstractConstraint
{
public function processAssert(
...
) {
CompatAssert::assertEquals('expected', $actual);
}
}