1--TEST--
2Test copy() function: usage variations - dir as source
3--SKIPIF--
4<?php
5if(substr(PHP_OS, 0, 3) != "WIN")
6  die("skip Run only on Windows");
7?>
8--FILE--
9<?php
10/* Test copy(): Trying to create a copy of an existing dir */
11
12$file_path = __DIR__;
13
14echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n";
15$src_dir = $file_path."/copy_variation12";
16mkdir($src_dir);
17
18$dest = $file_path."/copy_copy_variation12";
19
20var_dump( copy($src_dir, $dest) );
21
22var_dump( file_exists($dest) );
23
24var_dump( filesize($src_dir) );
25
26echo "*** Done ***\n";
27?>
28--CLEAN--
29<?php
30rmdir(__DIR__."/copy_variation12");
31?>
32--EXPECTF--
33*** Test copy() function: Trying to create a copy of an existing dir ***
34
35Warning: copy(): The first argument to copy() function cannot be a directory in %s on line %d
36bool(false)
37bool(false)
38int(0)
39*** Done ***
40