summaryrefslogtreecommitdiff
path: root/ext/dom
diff options
context:
space:
mode:
authorFabien Villepinte <fabien.villepinte@gmail.com>2019-03-15 22:55:30 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-03-15 22:55:30 +0100
commit26dfce7f36d1c6f737ac241df1315a1b42b932c7 (patch)
tree570279b2f4d66a3de7f6ff7f7c865654ad04cea4 /ext/dom
parent63802a8446691869371bb37078d55b99cae7eb95 (diff)
downloadphp-git-26dfce7f36d1c6f737ac241df1315a1b42b932c7.tar.gz
Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/dom')
-rw-r--r--ext/dom/tests/DOMDocument_createEntityReference_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_implementationRead_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_loadHTMLfile.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_variant1.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_saveHTML_variant2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_save_basic.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_savexml_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_basic.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_error1.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_error2.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_error3.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_error5.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_validate_basic.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_validate_error2.phpt2
-rw-r--r--ext/dom/tests/DOMDocument_validate_external_dtd.phpt4
-rw-r--r--ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt2
-rw-r--r--ext/dom/tests/DOMNode_C14NFile_basic.phpt4
-rw-r--r--ext/dom/tests/DOMNode_getLineNo_basic.phpt2
-rw-r--r--ext/dom/tests/DOMNode_getNodePath_basic.phpt2
-rw-r--r--ext/dom/tests/DOMNode_insertBefore_error2.phpt2
-rw-r--r--ext/dom/tests/DOMNode_insertBefore_error3.phpt2
-rw-r--r--ext/dom/tests/DOMNode_insertBefore_error4.phpt2
-rw-r--r--ext/dom/tests/DOMNode_insertBefore_error5.phpt2
-rw-r--r--ext/dom/tests/DOMNode_insertBefore_error6.phpt2
-rw-r--r--ext/dom/tests/bug37456.phpt2
-rw-r--r--ext/dom/tests/bug38949.phpt2
-rw-r--r--ext/dom/tests/bug41257.phpt2
-rw-r--r--ext/dom/tests/bug67081.phpt8
-rw-r--r--ext/dom/tests/dom003.phpt2
-rw-r--r--ext/dom/tests/dom004.phpt2
-rw-r--r--ext/dom/tests/dom005.phpt2
-rw-r--r--ext/dom/tests/dom006.phpt2
-rw-r--r--ext/dom/tests/dom_import_simplexml.phpt2
-rw-r--r--ext/dom/tests/dom_xinclude.phpt4
58 files changed, 78 insertions, 78 deletions
diff --git a/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt
index 2a3316ecc8..dd036b1bb4 100644
--- a/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt
+++ b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt
index 9482780b21..98da11ca2d 100644
--- a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt
+++ b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt
@@ -9,7 +9,7 @@ Lev Radin <prokurator@gmail.com>
<?php
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
var_dump($doc->implementation);
diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile.phpt
index 0431695737..dfbf8ec487 100644
--- a/ext/dom/tests/DOMDocument_loadHTMLfile.phpt
+++ b/ext/dom/tests/DOMDocument_loadHTMLfile.phpt
@@ -11,7 +11,7 @@ assert.bail=true
--FILE--
<?php
$doc = new DOMDocument();
-$result = $doc->loadHTMLFile(dirname(__FILE__) . "/test.html");
+$result = $doc->loadHTMLFile(__DIR__ . "/test.html");
assert($result === true);
?>
--EXPECT--
diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt
index 9542b69e84..cfb41686e8 100644
--- a/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt
+++ b/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt
@@ -11,7 +11,7 @@ assert.bail=true
--FILE--
<?php
$doc = new DOMDocument();
-$result = $doc->loadHTMLFile(dirname(__FILE__) . "/ffff/test.html");
+$result = $doc->loadHTMLFile(__DIR__ . "/ffff/test.html");
assert($result === false);
?>
--EXPECTF--
diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
index 991103649e..cb071594fa 100644
--- a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
+++ b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
@@ -11,7 +11,7 @@ assert.bail=true
--FILE--
<?php
$doc = new DOMDocument();
-$result = $doc->loadHTMLFile(dirname(__FILE__) . "/empty.html");
+$result = $doc->loadHTMLFile(__DIR__ . "/empty.html");
assert($result === true);
?>
--EXPECTF--
diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt
index 28533bf8af..2cbb1ed60d 100644
--- a/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt
+++ b/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt
@@ -11,7 +11,7 @@ assert.bail=true
--FILE--
<?php
$doc = new DOMDocument();
-$result = $doc->loadHTMLFile(dirname(__FILE__) . "/not_well.html");
+$result = $doc->loadHTMLFile(__DIR__ . "/not_well.html");
assert($result === true);
?>
--EXPECT--
diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt
index 17430d0770..5ae5f341d8 100644
--- a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt
+++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt
@@ -9,7 +9,7 @@ Lev Radin <prokurator@gmail.com>
<?php
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
var_dump($doc->preserveWhiteSpace);
diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt
index e467f56aa3..92a74a8390 100644
--- a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt
+++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt
@@ -10,14 +10,14 @@ Lev Radin <prokurator@gmail.com>
echo "Load document with preserveWhiteSpace on\n";
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
echo $doc->saveXML();
echo "\nLoad document with preserveWhiteSpace off\n";
$doc = new DOMDocument;
$doc->preserveWhiteSpace = false;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
echo $doc->saveXML();
?>
diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt
index 3e4d003ba4..e4b784e376 100644
--- a/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt
+++ b/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt
@@ -8,7 +8,7 @@ require_once('skipif.inc');
?>
--FILE--
<?php
-$rng = dirname(__FILE__).'/DOMDocument_relaxNGValidate_basic.rng';
+$rng = __DIR__.'/DOMDocument_relaxNGValidate_basic.rng';
$xml = <<< XML
<?xml version="1.0"?>
<apple>
diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt
index 53c773b221..ab6befa3b1 100644
--- a/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt
+++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt
@@ -8,7 +8,7 @@ require_once('skipif.inc');
?>
--FILE--
<?php
-$rng = dirname(__FILE__).'/DOMDocument_relaxNGValidate_basic.rng';
+$rng = __DIR__.'/DOMDocument_relaxNGValidate_basic.rng';
$xml = <<< XML
<?xml version="1.0"?>
<apple>
diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
index 3eb6bec21d..cdd6e64194 100644
--- a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
+++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt
@@ -8,7 +8,7 @@ require_once('skipif.inc');
?>
--FILE--
<?php
-$rng = dirname(__FILE__).'/foo.rng';
+$rng = __DIR__.'/foo.rng';
$xml = <<< XML
<?xml version="1.0"?>
<apple>
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt
index c38ea89633..30c090679c 100644
--- a/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt
@@ -5,11 +5,11 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
-$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html";
+$filename = __DIR__."/tmp_savehtmlfile".time().".html";
$doc = new DOMDocument('1.0');
$root = $doc->createElement('html');
$root = $doc->appendChild($root);
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
index af0965c1c9..aa25bb16e7 100644
--- a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt
index 7471a6e60c..02ced08282 100644
--- a/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt
@@ -5,11 +5,11 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
-$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html";
+$filename = __DIR__."/tmp_savehtmlfile".time().".html";
$doc = new DOMDocument('1.0');
$doc->formatOutput = true;
$root = $doc->createElement('html');
diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
index d5c6a797ef..6ca66730eb 100644
--- a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_saveHTML_basic.phpt b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt
index 8675b957a1..79d65f5b11 100644
--- a/ext/dom/tests/DOMDocument_saveHTML_basic.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
index e32e277803..83aefd5ba8 100644
--- a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt b/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt
index ef51e7f126..12502e8a9a 100644
--- a/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt
@@ -2,7 +2,7 @@
DOMDocument::saveHTML() optional parameters
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
index 9c02e13adc..09ff24b391 100644
--- a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
+++ b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
@@ -2,7 +2,7 @@
DOMDocument::saveHTML() vs DOMDocumet::saveXML()
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_save_basic.phpt b/ext/dom/tests/DOMDocument_save_basic.phpt
index bcad72dce5..2fe9cdac75 100644
--- a/ext/dom/tests/DOMDocument_save_basic.phpt
+++ b/ext/dom/tests/DOMDocument_save_basic.phpt
@@ -19,13 +19,13 @@ $title = $root->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $title->appendChild($text);
-$temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp";
+$temp_filename = __DIR__."/DomDocument_save_basic.tmp";
echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
?>
--CLEAN--
<?php
- $temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp";
+ $temp_filename = __DIR__."/DomDocument_save_basic.tmp";
unlink($temp_filename);
?>
--EXPECT--
diff --git a/ext/dom/tests/DOMDocument_savexml_basic.phpt b/ext/dom/tests/DOMDocument_savexml_basic.phpt
index a0978ebb82..f08fc4e582 100644
--- a/ext/dom/tests/DOMDocument_savexml_basic.phpt
+++ b/ext/dom/tests/DOMDocument_savexml_basic.phpt
@@ -25,7 +25,7 @@ EOXML;
$dom = new DOMDocument();
$dom->loadXML($xml);
$root = $dom->documentElement;
-$directory = dirname(__FILE__);
+$directory = __DIR__;
$filename = $directory."/tmp_dom_savexml".time();
var_dump($dom->save($filename));
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt
index 994b94d0c8..6140dc75b7 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt
@@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book-attr.xml");
+$doc->load(__DIR__."/book-attr.xml");
-$xsd = file_get_contents(dirname(__FILE__)."/book.xsd");
+$xsd = file_get_contents(__DIR__."/book.xsd");
$doc->schemaValidateSource($xsd, LIBXML_SCHEMA_CREATE);
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
index 38bc3fa3cc..aaf2ba865a 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$xsd = file_get_contents(dirname(__FILE__)."/book.xsd");
+$xsd = file_get_contents(__DIR__."/book.xsd");
$result = $doc->schemaValidateSource($xsd);
var_dump($result);
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
index 51eb82e32f..8c63ec6146 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt
@@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
$result = $doc->schemaValidateSource('string that is not a schema');
var_dump($result);
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
index 41a833b5aa..12295beade 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$xsd = file_get_contents(dirname(__FILE__)."/book-non-conforming-schema.xsd");
+$xsd = file_get_contents(__DIR__."/book-non-conforming-schema.xsd");
$result = $doc->schemaValidateSource($xsd);
var_dump($result);
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
index 93dd792609..41f9015b92 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt
@@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
$result = $doc->schemaValidateSource('');
var_dump($result);
diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt
index 7c98a74b1d..1f6761f768 100644
--- a/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt
@@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book-attr.xml");
+$doc->load(__DIR__."/book-attr.xml");
-$xsd = file_get_contents(dirname(__FILE__)."/book.xsd");
+$xsd = file_get_contents(__DIR__."/book.xsd");
$doc->schemaValidateSource($xsd);
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt
index e0b5251b23..93058df27a 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt
@@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book-attr.xml");
+$doc->load(__DIR__."/book-attr.xml");
-$doc->schemaValidate(dirname(__FILE__)."/book.xsd", LIBXML_SCHEMA_CREATE);
+$doc->schemaValidate(__DIR__."/book.xsd", LIBXML_SCHEMA_CREATE);
foreach ($doc->getElementsByTagName('book') as $book) {
var_dump($book->getAttribute('is-hardback'));
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
index eec790de6f..5f3ed67937 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$result = $doc->schemaValidate(dirname(__FILE__)."/book.xsd");
+$result = $doc->schemaValidate(__DIR__."/book.xsd");
var_dump($result);
?>
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
index 594c3c4291..d3ac5f5183 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$result = $doc->schemaValidate(dirname(__FILE__)."/book-not-a-schema.xsd");
+$result = $doc->schemaValidate(__DIR__."/book-not-a-schema.xsd");
var_dump($result);
?>
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
index 5ffd533652..302fcc6665 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$result = $doc->schemaValidate(dirname(__FILE__)."/book-non-conforming-schema.xsd");
+$result = $doc->schemaValidate(__DIR__."/book-non-conforming-schema.xsd");
var_dump($result);
?>
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
index 275204f920..2ff2ce9487 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt
@@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
$result = $doc->schemaValidate('');
var_dump($result);
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
index d5743bc6cf..cb57b55b41 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt
@@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
-$result = $doc->schemaValidate(dirname(__FILE__)."/non-existent-file");
+$result = $doc->schemaValidate(__DIR__."/non-existent-file");
var_dump($result);
?>
diff --git a/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt
index d253ad9690..f286379286 100644
--- a/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt
+++ b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt
@@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com>
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book-attr.xml");
+$doc->load(__DIR__."/book-attr.xml");
-$doc->schemaValidate(dirname(__FILE__)."/book.xsd");
+$doc->schemaValidate(__DIR__."/book.xsd");
foreach ($doc->getElementsByTagName('book') as $book) {
var_dump($book->getAttribute('is-hardback'));
diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt
index 33aecf4925..5a82aa5e24 100644
--- a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt
+++ b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt
@@ -9,7 +9,7 @@ Vincent Tsao <notes4vincent@gmail.com>
<?php
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
var_dump($doc->strictErrorChecking);
diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt
index b6d94f9de7..3d99e0eb70 100644
--- a/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt
+++ b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt
@@ -11,7 +11,7 @@ Vincent Tsao <notes4vincent@gmail.com>
echo "Load document\n";
$doc = new DOMDocument;
-$doc->load(dirname(__FILE__)."/book.xml");
+$doc->load(__DIR__."/book.xml");
echo "See if strictErrorChecking is on\n";
var_dump($doc->strictErrorChecking);
diff --git a/ext/dom/tests/DOMDocument_validate_basic.phpt b/ext/dom/tests/DOMDocument_validate_basic.phpt
index 21979b0bbe..092ff7cfe9 100644
--- a/ext/dom/tests/DOMDocument_validate_basic.phpt
+++ b/ext/dom/tests/DOMDocument_validate_basic.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt
index 08ec083fbb..c6d03bf02d 100644
--- a/ext/dom/tests/DOMDocument_validate_error2.phpt
+++ b/ext/dom/tests/DOMDocument_validate_error2.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
diff --git a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
index 39dd70ee88..5f85b14fc4 100644
--- a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
+++ b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt
@@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net>
#PHPTestFest2009 Norway 2009-06-09 \o/
--SKIPIF--
<?php
-require_once dirname(__FILE__) .'/skipif.inc';
+require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
// reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain
$dom = new DOMDocument('1.0');
$dom->substituteEntities = true;
-$dom->load(dirname(__FILE__).'/dom.xml');
+$dom->load(__DIR__.'/dom.xml');
var_dump($dom->validate());
?>
--EXPECT--
diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
index cdf36319b3..5eb42a9907 100644
--- a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
+++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt
@@ -13,7 +13,7 @@ require_once('skipif.inc');
require_once('dom_test.inc');
chdir(__DIR__);
-$XMLStringGood = file_get_contents(dirname(__FILE__).'/note.xml');
+$XMLStringGood = file_get_contents(__DIR__.'/note.xml');
$dom = new DOMDocument;
$dom->resolveExternals = TRUE;
diff --git a/ext/dom/tests/DOMNode_C14NFile_basic.phpt b/ext/dom/tests/DOMNode_C14NFile_basic.phpt
index 69edc860e4..b006e47deb 100644
--- a/ext/dom/tests/DOMNode_C14NFile_basic.phpt
+++ b/ext/dom/tests/DOMNode_C14NFile_basic.phpt
@@ -20,7 +20,7 @@ $xml = <<< XML
</books>
XML;
-$output = dirname(__FILE__).'/DOMNode_C14NFile_basic.tmp';
+$output = __DIR__.'/DOMNode_C14NFile_basic.tmp';
$doc = new DOMDocument();
$doc->loadXML($xml);
$node = $doc->getElementsByTagName('title')->item(0);
@@ -30,7 +30,7 @@ var_dump($content);
?>
--CLEAN--
<?php
-$output = dirname(__FILE__).'/DOMNode_C14NFile_basic.tmp';
+$output = __DIR__.'/DOMNode_C14NFile_basic.tmp';
unlink($output);
?>
--EXPECT--
diff --git a/ext/dom/tests/DOMNode_getLineNo_basic.phpt b/ext/dom/tests/DOMNode_getLineNo_basic.phpt
index f74d5d7cc9..655b751355 100644
--- a/ext/dom/tests/DOMNode_getLineNo_basic.phpt
+++ b/ext/dom/tests/DOMNode_getLineNo_basic.phpt
@@ -6,7 +6,7 @@ include('skipif.inc');
?>
--FILE--
<?php
-$file = dirname(__FILE__).'/book.xml';
+$file = __DIR__.'/book.xml';
$doc = new DOMDocument();
$doc->load($file);
$nodes = $doc->getElementsByTagName('title');
diff --git a/ext/dom/tests/DOMNode_getNodePath_basic.phpt b/ext/dom/tests/DOMNode_getNodePath_basic.phpt
index b422a5dbef..c490e0941f 100644
--- a/ext/dom/tests/DOMNode_getNodePath_basic.phpt
+++ b/ext/dom/tests/DOMNode_getNodePath_basic.phpt
@@ -6,7 +6,7 @@ include('skipif.inc');
?>
--FILE--
<?php
-$file = dirname(__FILE__).'/book.xml';
+$file = __DIR__.'/book.xml';
$doc = new DOMDocument();
$doc->load($file);
$nodes = $doc->getElementsByTagName('title');
diff --git a/ext/dom/tests/DOMNode_insertBefore_error2.phpt b/ext/dom/tests/DOMNode_insertBefore_error2.phpt
index fbe212d4b9..e951cd237a 100644
--- a/ext/dom/tests/DOMNode_insertBefore_error2.phpt
+++ b/ext/dom/tests/DOMNode_insertBefore_error2.phpt
@@ -14,7 +14,7 @@ assert.bail=true
<?php
$dom = new DOMDocument();
-$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
+$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS);
assert($doc === true);
$parent_node = $dom->getElementsByTagName("book")->item(0);
diff --git a/ext/dom/tests/DOMNode_insertBefore_error3.phpt b/ext/dom/tests/DOMNode_insertBefore_error3.phpt
index a8b4e45494..6e5137798c 100644
--- a/ext/dom/tests/DOMNode_insertBefore_error3.phpt
+++ b/ext/dom/tests/DOMNode_insertBefore_error3.phpt
@@ -14,7 +14,7 @@ assert.bail=true
<?php
$dom = new DOMDocument();
-$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
+$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS);
assert($doc === true);
$parent_node = $dom->getElementsByTagName("book")->item(0);
diff --git a/ext/dom/tests/DOMNode_insertBefore_error4.phpt b/ext/dom/tests/DOMNode_insertBefore_error4.phpt
index 5b1fc3150a..84fbcd82dd 100644
--- a/ext/dom/tests/DOMNode_insertBefore_error4.phpt
+++ b/ext/dom/tests/DOMNode_insertBefore_error4.phpt
@@ -14,7 +14,7 @@ assert.bail=true
<?php
$dom = new DOMDocument();
-$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
+$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS);
assert($doc === true);
$parent_node = $dom->getElementsByTagName("book")->item(0);
diff --git a/ext/dom/tests/DOMNode_insertBefore_error5.phpt b/ext/dom/tests/DOMNode_insertBefore_error5.phpt
index f5bcf098e7..e9dac3a459 100644
--- a/ext/dom/tests/DOMNode_insertBefore_error5.phpt
+++ b/ext/dom/tests/DOMNode_insertBefore_error5.phpt
@@ -14,7 +14,7 @@ assert.bail=true
<?php
$dom = new DOMDocument();
-$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
+$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS);
assert($doc === true);
$parent_node = $dom->getElementsByTagName("book")->item(0);
diff --git a/ext/dom/tests/DOMNode_insertBefore_error6.phpt b/ext/dom/tests/DOMNode_insertBefore_error6.phpt
index 5afecafed7..6027d44140 100644
--- a/ext/dom/tests/DOMNode_insertBefore_error6.phpt
+++ b/ext/dom/tests/DOMNode_insertBefore_error6.phpt
@@ -14,7 +14,7 @@ assert.bail=true
<?php
$dom = new DOMDocument();
-$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS);
+$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS);
assert($doc === true);
$parent_node = $dom->getElementsByTagName("book")->item(0);
diff --git a/ext/dom/tests/bug37456.phpt b/ext/dom/tests/bug37456.phpt
index d5a833413e..6d74a00308 100644
--- a/ext/dom/tests/bug37456.phpt
+++ b/ext/dom/tests/bug37456.phpt
@@ -7,7 +7,7 @@ Bug #37456 (DOMElement->setAttribute() loops forever)
$doc = new DOMDocument();
$doc->resolveExternals = true;
-$doc->load(dirname(__FILE__)."/dom.xml");
+$doc->load(__DIR__."/dom.xml");
$root = $doc->getElementsByTagName('foo')->item(0);
$root->setAttribute('bar', '&gt;');
diff --git a/ext/dom/tests/bug38949.phpt b/ext/dom/tests/bug38949.phpt
index 4c81d9b731..47d0720ef4 100644
--- a/ext/dom/tests/bug38949.phpt
+++ b/ext/dom/tests/bug38949.phpt
@@ -6,7 +6,7 @@ Bug #38949 (Cannot get xmlns value attribute)
<?php
$doc = new DOMDocument();
-$doc->load(dirname(__FILE__)."/nsdoc.xml");
+$doc->load(__DIR__."/nsdoc.xml");
$root = $doc->documentElement;
diff --git a/ext/dom/tests/bug41257.phpt b/ext/dom/tests/bug41257.phpt
index edf62a53a3..71522617a3 100644
--- a/ext/dom/tests/bug41257.phpt
+++ b/ext/dom/tests/bug41257.phpt
@@ -6,7 +6,7 @@ Bug #41257 (lookupNamespaceURI does not work as expected)
<?php
$doc = new DOMDocument();
-$doc->load(dirname(__FILE__)."/nsdoc.xml");
+$doc->load(__DIR__."/nsdoc.xml");
$root = $doc->documentElement;
diff --git a/ext/dom/tests/bug67081.phpt b/ext/dom/tests/bug67081.phpt
index c6dc007d43..faf7f42b2c 100644
--- a/ext/dom/tests/bug67081.phpt
+++ b/ext/dom/tests/bug67081.phpt
@@ -8,22 +8,22 @@ require_once('skipif.inc');
<?php
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
- $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_0.xml");
+ $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_0.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
- $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_1.xml");
+ $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_1.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
- $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_2.xml");
+ $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_2.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
- $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "dom.xml");
+ $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "dom.xml");
var_dump($domDocument->doctype->internalSubset);
?>
===DONE===
diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt
index 4c9d5a979f..05d23cd792 100644
--- a/ext/dom/tests/dom003.phpt
+++ b/ext/dom/tests/dom003.phpt
@@ -6,7 +6,7 @@ Test 3: Exception Test
<?php
$dom = new domdocument;
-$dom->load(dirname(__FILE__)."/book.xml");
+$dom->load(__DIR__."/book.xml");
$rootNode = $dom->documentElement;
print "--- Catch exception with try/catch\n";
try {
diff --git a/ext/dom/tests/dom004.phpt b/ext/dom/tests/dom004.phpt
index 3a9295feb3..383b731a8c 100644
--- a/ext/dom/tests/dom004.phpt
+++ b/ext/dom/tests/dom004.phpt
@@ -8,7 +8,7 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap
--FILE--
<?php
$dom = new domdocument;
-$dom->load("compress.zlib://".dirname(__FILE__)."/book.xml.gz");
+$dom->load("compress.zlib://".__DIR__."/book.xml.gz");
print $dom->saveXML();
--EXPECT--
<?xml version="1.0"?>
diff --git a/ext/dom/tests/dom005.phpt b/ext/dom/tests/dom005.phpt
index d7e828cc32..1006229997 100644
--- a/ext/dom/tests/dom005.phpt
+++ b/ext/dom/tests/dom005.phpt
@@ -5,7 +5,7 @@ Test 5: HTML Test
--FILE--
<?php
$dom = new domdocument;
-$dom->loadHTMLFile(dirname(__FILE__)."/test.html", LIBXML_NOBLANKS);
+$dom->loadHTMLFile(__DIR__."/test.html", LIBXML_NOBLANKS);
print "--- save as XML\n";
print adjustDoctype($dom->saveXML());
diff --git a/ext/dom/tests/dom006.phpt b/ext/dom/tests/dom006.phpt
index 6872a293ee..bd4b3922a9 100644
--- a/ext/dom/tests/dom006.phpt
+++ b/ext/dom/tests/dom006.phpt
@@ -23,7 +23,7 @@ Class books extends domDocument {
$dom = new books;
-$dom->load(dirname(__FILE__)."/book.xml");
+$dom->load(__DIR__."/book.xml");
$dom->addBook("PHP de Luxe", "Richard Samar, Christian Stocker");
print $dom->saveXML();
--EXPECT--
diff --git a/ext/dom/tests/dom_import_simplexml.phpt b/ext/dom/tests/dom_import_simplexml.phpt
index 81744aa260..6b39234851 100644
--- a/ext/dom/tests/dom_import_simplexml.phpt
+++ b/ext/dom/tests/dom_import_simplexml.phpt
@@ -5,7 +5,7 @@ Interop Test: Import from SimpleXML
<?php if (!extension_loaded('simplexml')) die('skip simplexml extension not available');?>
--FILE--
<?php
-$s = simplexml_load_file(dirname(__FILE__)."/book.xml");
+$s = simplexml_load_file(__DIR__."/book.xml");
if(!$s) {
echo "Error while loading the document\n";
exit;
diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt
index 5d8906e316..a698895c60 100644
--- a/ext/dom/tests/dom_xinclude.phpt
+++ b/ext/dom/tests/dom_xinclude.phpt
@@ -9,8 +9,8 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap
<?php
$dom = new domdocument;
-$data = file_get_contents(dirname(__FILE__)."/xinclude.xml");
-$reldir = str_replace(getcwd(),".",dirname(__FILE__));
+$data = file_get_contents(__DIR__."/xinclude.xml");
+$reldir = str_replace(getcwd(),".",__DIR__);
if (DIRECTORY_SEPARATOR == '\\') {
$reldir = str_replace('\\',"/", $reldir);
}