canRead($filename)); } public function providerCanReadVerySmallFile() { $padding = str_repeat('a', 2048); return [ [true, ' ' . $padding . ' '], [true, ' ' . $padding . ''], [true, ''], [false, ''], ]; } /** * @dataProvider providerCanReadVerySmallFile * * @param bool $expected * @param string $content */ public function testCanReadVerySmallFile($expected, $content) { $filename = tempnam(sys_get_temp_dir(), 'html'); file_put_contents($filename, $content); $reader = new Html(); $actual = $reader->canRead($filename); unlink($filename); self::assertSame($expected, $actual); } public function testBackgroundColorInRanding() { $html = '
Blue background |