Closed
Description
Q | A |
---|---|
PHPUnit version | 7.2.7 |
PHP version | 7.2.5 |
Installation Method | Composer |
The following test will fail but no differences will be displayed.
<?php
use PHPUnit\Framework\TestCase;
class FooTest extends TestCase
{
public function testFoo()
{
$this->assertArraySubset(['foo' => 1], ['foo' => '1'], true);
}
}
% ./vendor/bin/phpunit FooTest.php
PHPUnit 7.2.7 by Sebastian Bergmann and contributors.
F 1 / 1 (100%)
Time: 28 ms, Memory: 4.00MB
There was 1 failure:
1) FooTest::testFoo
Failed asserting that an array has the subset Array &0 (
'foo' => 1
).
--- Expected
+++ Actual
/Users/matsui/src.nobk/phpunit-test/FooTest.php:8
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
Metadata
Metadata
Assignees
Labels
No labels