1--TEST--
2Phar::buildFromDirectory() - object passed as second parameter
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.require_hash=0
7phar.readonly=0
8--FILE--
9<?php
10
11try {
12	$phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar');
13	$phar->buildFromDirectory('files', new stdClass);
14} catch (Exception $e) {
15	var_dump(get_class($e));
16	echo $e->getMessage() . "\n";
17}
18?>
19===DONE===
20--CLEAN--
21<?php
22unlink(dirname(__FILE__) . '/buildfromiterator.phar');
23__HALT_COMPILER();
24?>
25--EXPECTF--
26Warning: Phar::buildFromDirectory() expects parameter 2 to be %string, object given in %sphar_buildfromdirectory3.php on line %d
27===DONE===
28