Use an empty string as default for assertEquals
Make sure it isn’t interpreted as a type NULL, making the test fail with PHPUnit 7.2.
This commit is contained in:
parent
18edda3716
commit
31353147a3
@ -138,7 +138,7 @@ class ClassMapGeneratorTest extends TestCase
|
|||||||
), ClassMapGenerator::createMap($finder));
|
), ClassMapGenerator::createMap($finder));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function assertEqualsNormalized($expected, $actual, $message = null)
|
protected function assertEqualsNormalized($expected, $actual, $message = '')
|
||||||
{
|
{
|
||||||
foreach ($expected as $ns => $path) {
|
foreach ($expected as $ns => $path) {
|
||||||
$expected[$ns] = str_replace('\\', '/', $path);
|
$expected[$ns] = str_replace('\\', '/', $path);
|
||||||
|
@ -1027,7 +1027,7 @@ HTML;
|
|||||||
/**
|
/**
|
||||||
* @dataProvider getBaseTagData
|
* @dataProvider getBaseTagData
|
||||||
*/
|
*/
|
||||||
public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri = null, $description = null)
|
public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri = null, $description = '')
|
||||||
{
|
{
|
||||||
$crawler = new Crawler('<html><base href="'.$baseValue.'"><a href="'.$linkValue.'"></a></html>', $currentUri);
|
$crawler = new Crawler('<html><base href="'.$baseValue.'"><a href="'.$linkValue.'"></a></html>', $currentUri);
|
||||||
$this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description);
|
$this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description);
|
||||||
|
@ -73,7 +73,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
@ -83,7 +83,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDurationBeforeStop()
|
public function testDurationBeforeStop()
|
||||||
@ -91,7 +91,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
usleep(200000);
|
usleep(200000);
|
||||||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
||||||
|
|
||||||
$event = new StopwatchEvent(microtime(true) * 1000);
|
$event = new StopwatchEvent(microtime(true) * 1000);
|
||||||
$event->start();
|
$event->start();
|
||||||
@ -100,7 +100,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
usleep(50000);
|
usleep(50000);
|
||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$this->assertEquals(100, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(100, $event->getDuration(), '', self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,7 +134,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->ensureStopped();
|
$event->ensureStopped();
|
||||||
$this->assertEquals(300, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(300, $event->getDuration(), '', self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStartTime()
|
public function testStartTime()
|
||||||
@ -151,7 +151,7 @@ class StopwatchEventTest extends TestCase
|
|||||||
$event->start();
|
$event->start();
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
$event->stop();
|
$event->stop();
|
||||||
$this->assertEquals(0, $event->getStartTime(), null, self::DELTA);
|
$this->assertEquals(0, $event->getStartTime(), '', self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -79,7 +79,7 @@ class StopwatchTest extends TestCase
|
|||||||
$event = $stopwatch->stop('foo');
|
$event = $stopwatch->stop('foo');
|
||||||
|
|
||||||
$this->assertInstanceOf('Symfony\Component\Stopwatch\StopwatchEvent', $event);
|
$this->assertInstanceOf('Symfony\Component\Stopwatch\StopwatchEvent', $event);
|
||||||
$this->assertEquals(200, $event->getDuration(), null, self::DELTA);
|
$this->assertEquals(200, $event->getDuration(), '', self::DELTA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@ yaml: |
|
|||||||
php: |
|
php: |
|
||||||
"\\0 \\ \\a \\b \\n"
|
"\\0 \\ \\a \\b \\n"
|
||||||
---
|
---
|
||||||
test: null
|
test: 'null'
|
||||||
yaml: |
|
yaml: |
|
||||||
"\0"
|
"\0"
|
||||||
php: |
|
php: |
|
||||||
|
Reference in New Issue
Block a user