diff options
author | Nils Adermann <naderman@naderman.de> | 2010-08-19 22:06:19 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-08-19 22:06:19 +0200 |
commit | f870434222b209f705b902168cad179b7ef8bd12 (patch) | |
tree | 8f494295a9de92bca6905ac8d9a949e4d358488a /tests/class_loader | |
parent | dea1d660fb63b07451f1a43310de359251462644 (diff) | |
download | forums-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.php | 6 | ||||
-rw-r--r-- | tests/class_loader/includes/dir.php | 6 |
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 +{ +} + |