Skip to content

Commit

Permalink
BR-6654: Move test fixtures to separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Vlasov committed Aug 9, 2019
1 parent f4de0e1 commit ac49070
Show file tree
Hide file tree
Showing 27 changed files with 6 additions and 87 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
84 changes: 2 additions & 82 deletions tests/glob.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -105,89 +105,9 @@ array(9) {
[8]=>
string(3) "txt"
}
array(42) {
array(2) {
[0]=>
string(4) "TODO"
[1]=>
string(10) "chgrp.phpt"
[2]=>
string(10) "chmod.phpt"
[3]=>
string(10) "chown.phpt"
[4]=>
string(8) "dir.phpt"
[5]=>
string(9) "dirs.phpt"
[6]=>
string(11) "exists.phpt"
[7]=>
string(10) "fread.phpt"
[8]=>
string(14) "getconfig.phpt"
[9]=>
string(8) "glob.php"
[10]=>
string(9) "glob.phpt"
[11]=>
string(8) "instance"
[12]=>
string(16) "is_writable.phpt"
[13]=>
string(12) "maindir.phpt"
[14]=>
string(10) "mkdir.phpt"
[15]=>
string(11) "mkdir2.phpt"
[16]=>
string(11) "mkdir3.phpt"
[17]=>
string(13) "override.phpt"
[18]=>
string(19) "override_class.phpt"
[19]=>
string(9) "read.phpt"
[20]=>
string(16) "read_custom.phpt"
[21]=>
string(12) "readdir.phpt"
[22]=>
string(18) "realpath-open.phpt"
[23]=>
string(11) "rename.phpt"
[24]=>
string(12) "require.phpt"
[25]=>
string(17) "require_once.phpt"
[26]=>
string(18) "require_once2.phpt"
[27]=>
string(18) "require_once3.phpt"
[28]=>
string(25) "require_once_opcache.phpt"
[29]=>
string(9) "setup.inc"
[30]=>
string(20) "shadow_settings.phpt"
[31]=>
string(11) "stream.phpt"
[32]=>
[1]=>
string(11) "templatedir"
[33]=>
string(10) "touch.phpt"
[34]=>
string(11) "unlink.phpt"
[35]=>
string(12) "unlink2.phpt"
[36]=>
string(17) "write-rename.phpt"
[37]=>
string(10) "write.phpt"
[38]=>
string(17) "write_custom.phpt"
[39]=>
string(14) "write_new.phpt"
[40]=>
string(15) "write_new2.phpt"
[41]=>
string(19) "write_new_mask.phpt"
}
2 changes: 1 addition & 1 deletion tests/mkdir3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Check creating directories when shadow is not enabled
} ?>
--FILE--
<?php
$instance = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'instance';
$instance = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR . 'instance';
mkdir("$instance/cache/upgrades");

echo "Created\n";
Expand Down
5 changes: 2 additions & 3 deletions tests/override_class.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ $zip->addEmptyDir("txt/");
$zip->addFile("txt/ifile.txt", "txt/ifile.txt");
$zip->close();
shadow("","");
chdir(dirname(__FILE__));
chdir($topdir);
var_dump(file_exists("instance/instdir/test.zip"));
$zip->open("instance/instdir/test.zip");
var_dump($zip->getNameIndex(0));
var_dump($zip->getNameIndex(1));
unlink("instance/instdir/test.zip");
unlink('instance/instdir/test.zip');
?>
--EXPECT--
bool(true)
string(4) "txt/"
string(13) "txt/ifile.txt"

2 changes: 1 addition & 1 deletion tests/setup.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$topdir = dirname(__FILE__);
$topdir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fixtures';
$template = join(DIRECTORY_SEPARATOR, [$topdir, "templatedir"]);
$instance = join(DIRECTORY_SEPARATOR, [$topdir, "instance"]);

Expand Down

0 comments on commit ac49070

Please sign in to comment.