1--TEST--
2Phar::buildFromDirectory() - non-directory passed as first parameter
3--EXTENSIONS--
4phar
5--SKIPIF--
6<?php
7    if (substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
8?>
9--INI--
10phar.require_hash=0
11phar.readonly=0
12--FILE--
13<?php
14try {
15    $phar = new Phar(__DIR__ . '/buildfromdirectory2.phar');
16    $phar->buildFromDirectory(1);
17} catch (Exception $e) {
18    var_dump(get_class($e));
19    echo $e->getMessage() . "\n";
20}
21?>
22--CLEAN--
23<?php
24unlink(__DIR__ . '/buildfromdirectory2.phar');
25__HALT_COMPILER();
26?>
27--EXPECTF--
28%s(24) "UnexpectedValueException"
29RecursiveDirectoryIterator::__construct(1): Failed to open directory: No such file or directory
30