1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge pull request #2494 from Nicofuma/ticket/12589

[ticket/12589] Search directly in $directory if it's an absolute sub-path

* Nicofuma/ticket/12589:
  [ticket/12589] Add test searching in a non absolute directory
  [ticket/12589] Fix tests
  [ticket/12589] Search directly in $directory if it's an absolute sub-path
This commit is contained in:
Joas Schilling
2014-05-31 01:35:10 +02:00
2 changed files with 65 additions and 34 deletions

View File

@@ -132,6 +132,22 @@ class phpbb_extension_finder_test extends phpbb_test_case
);
}
public function test_non_absolute_directory_get_classes()
{
$classes = $this->finder
->directory('type/')
->get_classes();
sort($classes);
$this->assertEquals(
array(
'\vendor2\foo\sub\type\alternative',
'\vendor2\foo\type\alternative',
),
$classes
);
}
public function test_sub_directory_get_classes()
{
$classes = $this->finder