Skip to content

Commit

Permalink
Add (failing) test for classes in subdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
xendk committed Apr 10, 2017
1 parent 2aae77b commit f153e5c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
12 changes: 9 additions & 3 deletions features/ede-php-autoload-completion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace Psr0Ns\Subdir;

class TheClass1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace Psr0Ns\Subdir;

class TheClass2
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace Psr4Ns\Subdir;

class TheClass1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace Psr4Ns\Subdir;

class TheClass2
{
}

0 comments on commit f153e5c

Please sign in to comment.