aboutsummaryrefslogtreecommitdiffstats
path: root/tests/class_loader
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-08-19 22:06:19 +0200
committerNils Adermann <naderman@naderman.de>2010-08-19 22:06:19 +0200
commitf870434222b209f705b902168cad179b7ef8bd12 (patch)
tree8f494295a9de92bca6905ac8d9a949e4d358488a /tests/class_loader
parentdea1d660fb63b07451f1a43310de359251462644 (diff)
downloadforums-f870434222b209f705b902168cad179b7ef8bd12.tar
forums-f870434222b209f705b902168cad179b7ef8bd12.tar.gz
forums-f870434222b209f705b902168cad179b7ef8bd12.tar.bz2
forums-f870434222b209f705b902168cad179b7ef8bd12.tar.xz
forums-f870434222b209f705b902168cad179b7ef8bd12.zip
[feature/auto-loading] Only check subdir if there is another name part.
PHPBB3-9682
Diffstat (limited to 'tests/class_loader')
-rw-r--r--tests/class_loader/class_loader_test.php6
-rw-r--r--tests/class_loader/includes/dir.php6
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php
index 37c11657c4..e53507ded3 100644
--- a/tests/class_loader/class_loader_test.php
+++ b/tests/class_loader/class_loader_test.php
@@ -24,6 +24,12 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
$prefix .= 'includes/';
$this->assertEquals(
+ '',
+ $class_loader->resolve_path('phpbb_dir'),
+ 'Class with same name as a directory is unloadable'
+ );
+
+ $this->assertEquals(
$prefix . 'class_name.php',
$class_loader->resolve_path('phpbb_class_name'),
'Top level class'
diff --git a/tests/class_loader/includes/dir.php b/tests/class_loader/includes/dir.php
new file mode 100644
index 0000000000..1c8930d8e7
--- /dev/null
+++ b/tests/class_loader/includes/dir.php
@@ -0,0 +1,6 @@
+<?php
+
+class phpbb_dir
+{
+}
+