xref: /PHP-7.1/ext/spl/tests/bug45216.phpt (revision 7af945e2)
1--TEST--
2SPL: SplFileObject::fgetss (bug 45216)
3--CREDITS--
4Perrick Penet <perrick@noparking.net>
5#testfest phpcampparis 2008-06-07
6--FILE--
7<?php
8$file = dirname(__FILE__) . '/foo.html';
9file_put_contents($file, 'text 0<div class="tested">text 1</div>');
10$handle = fopen($file, 'r');
11
12$object = new SplFileObject($file);
13var_dump($object->fgetss());
14var_dump(fgetss($handle));
15?>
16--CLEAN--
17<?php
18unlink(dirname(__FILE__) . '/foo.html');
19?>
20--EXPECTF--
21string(12) "text 0text 1"
22string(12) "text 0text 1"
23