1--TEST--
2SPL: DirectoryIterator test getOwner
3--EXTENSIONS--
4posix
5--SKIPIF--
6<?php
7if (PHP_OS_FAMILY === 'Windows') { die('SKIP Testing file ownership, not available for Windows'); }
8if (posix_geteuid() == 0) die('SKIP Cannot run test as root.');
9--CREDITS--
10Cesare D'Amico <cesare.damico@gruppovolta.it>
11Andrea Giorgini <agiorg@gmail.com>
12Filippo De Santis <fd@ideato.it>
13Daniel Londero <daniel.londero@gmail.com>
14Francesco Trucchia <ft@ideato.it>
15Jacopo Romei <jacopo@sviluppoagile.it>
16#Test Fest Cesena (Italy) on 2009-06-20
17--FILE--
18<?php
19$dirname = 'DirectoryIterator_getOwner_basic';
20mkdir($dirname);
21$dir = new DirectoryIterator($dirname);
22$expected = fileowner($dirname);
23$actual = $dir->getOwner();
24var_dump($expected == $actual);
25?>
26--CLEAN--
27<?php
28$dirname = 'DirectoryIterator_getOwner_basic';
29rmdir($dirname);
30?>
31--EXPECT--
32bool(true)
33