From f153e5cd54781b4c2d8599d71ade2519b0b0f698 Mon Sep 17 00:00:00 2001 From: Thomas Fini Hansen Date: Mon, 10 Apr 2017 19:45:45 +0200 Subject: [PATCH] Add (failing) test for classes in subdirs --- features/ede-php-autoload-completion.feature | 12 +++++++++--- .../src/Psr0Ns/TheSubdir/TheClass1.php | 6 ++++++ .../src/Psr0Ns/TheSubdir/TheClass2.php | 6 ++++++ .../src/Psr4Ns/TheSubdir/TheClass1.php | 6 ++++++ .../src/Psr4Ns/TheSubdir/TheClass2.php | 6 ++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 test/projects/without-composer/src/Psr0Ns/TheSubdir/TheClass1.php create mode 100644 test/projects/without-composer/src/Psr0Ns/TheSubdir/TheClass2.php create mode 100644 test/projects/without-composer/src/Psr4Ns/TheSubdir/TheClass1.php create mode 100644 test/projects/without-composer/src/Psr4Ns/TheSubdir/TheClass2.php diff --git a/features/ede-php-autoload-completion.feature b/features/ede-php-autoload-completion.feature index 974ec11..bff3e98 100644 --- a/features/ede-php-autoload-completion.feature +++ b/features/ede-php-autoload-completion.feature @@ -8,19 +8,25 @@ Feature: Class name completion Scenario: Complete PSR-0 namespace with slashes Given I visit "src/main.php" in project "without-composer" Then completions for query "Psr0Ns\T" should be: - | TheClass | + | TheClass | TheSubdir | + Then completions for query "Psr0Ns\TheSubdir\" should be: + | TheClass1 | TheClass2 | Scenario: Complete PSR-0 namespace with underscores Given I visit "src/main.php" in project "without-composer" Then completions for query "Psr0Ns_T" should be: - | Psr0Ns_TheClass | + | Psr0Ns_TheClass | Psr0Ns_TheSubdir | + Then completions for query "Psr0Ns_TheSubdir_" should be: + | Psr0Ns_TheSubdir_TheClass1 | Psr0Ns_TheSubdir_TheClass2 | Scenario: Complete PSR-4 namespaces Given I visit "src/main.php" in project "without-composer" Then completions for query "Psr4" should be: | Psr4Ns | Psr4Split\Ns1 | Psr4Split\Ns2 | And completions for query "Psr4Ns\T" should be: - | TheClass | + | TheClass | TheSubdir | + Then completions for query "Psr4Ns\TheSubdir\" should be: + | TheClass1 | TheClass2 | Scenario: Complete PSR-4 multi-dir namespaces Given I visit "src/main.php" in project "without-composer" diff --git a/test/projects/without-composer/src/Psr0Ns/TheSubdir/TheClass1.php b/test/projects/without-composer/src/Psr0Ns/TheSubdir/TheClass1.php new file mode 100644 index 0000000..40e5bc8 --- /dev/null +++ b/test/projects/without-composer/src/Psr0Ns/TheSubdir/TheClass1.php @@ -0,0 +1,6 @@ +