summaryrefslogtreecommitdiff
path: root/ext/spl/tests/fileobject_003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/fileobject_003.phpt')
-rw-r--r--ext/spl/tests/fileobject_003.phpt62
1 files changed, 31 insertions, 31 deletions
diff --git a/ext/spl/tests/fileobject_003.phpt b/ext/spl/tests/fileobject_003.phpt
index 6c2751c89b..4f33065d42 100644
--- a/ext/spl/tests/fileobject_003.phpt
+++ b/ext/spl/tests/fileobject_003.phpt
@@ -5,40 +5,40 @@ SPL: SplFileInfo cloning
function test($name, $lc, $lp)
{
- static $i = 0;
- echo "===$i===\n";
- $i++;
+ static $i = 0;
+ echo "===$i===\n";
+ $i++;
- $o = new SplFileInfo($name);
+ $o = new SplFileInfo($name);
- var_dump($o);
- $c = clone $o;
- var_dump($c);
- var_dump($o === $c);
- var_dump($o == $c);
- var_dump($o->getPathname() == $c->getPathname());
+ var_dump($o);
+ $c = clone $o;
+ var_dump($c);
+ var_dump($o === $c);
+ var_dump($o == $c);
+ var_dump($o->getPathname() == $c->getPathname());
- try {
- $f = new SplFileObject($name);
- var_dump($name);
- var_dump($f->getPathName());
- $l = substr($f->getPathName(), -1);
- var_dump($l != '/' && $l != '\\' && $l == $lc);
- var_dump($f->getFileName());
- $l = substr($f->getFileName(), -1);
- var_dump($l != '/' && $l != '\\' && $l == $lc);
- var_dump($f->getPath());
- $l = substr($f->getPath(), -1);
- var_dump($l != '/' && $l != '\\' && $l == $lp);
- } catch (LogicException $e) {
- echo "LogicException: ".$e->getMessage()."\n";
- }
- try {
- $fo = $o->openFile();
- var_dump($fo->getPathName(), $fo->getFileName(), $fo->getPath());
- } catch (LogicException $e) {
- echo "LogicException: ".$e->getMessage()."\n";
- }
+ try {
+ $f = new SplFileObject($name);
+ var_dump($name);
+ var_dump($f->getPathName());
+ $l = substr($f->getPathName(), -1);
+ var_dump($l != '/' && $l != '\\' && $l == $lc);
+ var_dump($f->getFileName());
+ $l = substr($f->getFileName(), -1);
+ var_dump($l != '/' && $l != '\\' && $l == $lc);
+ var_dump($f->getPath());
+ $l = substr($f->getPath(), -1);
+ var_dump($l != '/' && $l != '\\' && $l == $lp);
+ } catch (LogicException $e) {
+ echo "LogicException: ".$e->getMessage()."\n";
+ }
+ try {
+ $fo = $o->openFile();
+ var_dump($fo->getPathName(), $fo->getFileName(), $fo->getPath());
+ } catch (LogicException $e) {
+ echo "LogicException: ".$e->getMessage()."\n";
+ }
}
test(__DIR__ . '/' . 'fileobject_001a.txt', 't', substr(__DIR__,-1));