|
| 1 | +Feature: Hand-made EDE project creation |
| 2 | + |
| 3 | + Scenario: Visit a file in the ede project |
| 4 | + Given I visit "src/main.php" in project "without-composer" |
| 5 | + Then ede-php-autoload-project should exist |
| 6 | + And ede-php-autoload-project should have "." as include path |
| 7 | + And ede-php-autoload-project should have "/usr/share/php" as system include path |
| 8 | + |
| 9 | + Scenario: Visit a directory in the ede project |
| 10 | + Given I visit "." in project "without-composer" |
| 11 | + Then ede-php-autoload-project should exist |
| 12 | + |
| 13 | + Scenario: Load a basic PSR-0 class |
| 14 | + Given I visit "src/main.php" in project "without-composer" |
| 15 | + Then the class "Psr0Ns_TheClass" should be detected in "src/Psr0Ns/TheClass.php" |
| 16 | + |
| 17 | + Scenario: Load a split PSR-0 namespace |
| 18 | + Given I visit "src/main.php" in project "without-composer" |
| 19 | + Then the class "Psr0Split\Ns2\TheClass" should be detected in "src/Psr0Split/Ns2/TheClass.php" |
| 20 | + |
| 21 | + Scenario: Load a basic PSR-4 class |
| 22 | + Given I visit "src/main.php" in project "without-composer" |
| 23 | + Then the class "Psr4Ns\TheClass" should be detected in "src/Psr4Ns/TheClass.php" |
| 24 | + |
| 25 | + Scenario: Load a split PSR-4 namespace |
| 26 | + Given I visit "src/main.php" in project "without-composer" |
| 27 | + Then the class "Psr4Split\Ns2\TheClass" should be detected in "src/Psr4Split/Ns2/TheClass.php" |
| 28 | + |
| 29 | + Scenario: Load a PSR-4 multi-directory namespace |
| 30 | + Given I visit "src/main.php" in project "without-composer" |
| 31 | + Then the class "MultiDirNs\\TheClass1" should be detected in "src/MultiDirNs1/TheClass1.php" |
| 32 | + And the class "MultiDirNs\\TheClass2" should be detected in "src/MultiDirNs2/TheClass2.php" |
| 33 | + |
| 34 | + Scenario: Guess a PSR-4 class name |
| 35 | + Given I visit "src/main.php" in project "without-composer" |
| 36 | + Then guessing the class name for "src/MultiDirNs1/SubNs1/SubNs2/Class.php" should return "MultiDirNs\SubNs1\SubNs2\Class" |
| 37 | + |
| 38 | + Scenario: Guess a split PSR-4 class name |
| 39 | + Given I visit "src/main.php" in project "without-composer" |
| 40 | + Then guessing the class name for "src/Psr4Split/Ns2/MyClass.php" should return "Psr4Split\Ns2\MyClass" |
| 41 | + |
| 42 | + Scenario: Load a classmap class |
| 43 | + Given I visit "src/main.php" in project "without-composer" |
| 44 | + Then the class "ClassMapNs\MyClass" should be detected in "src/ClassMapNs/MyClass.php" |
| 45 | + |
| 46 | + Scenario: Guess a classmap class name |
| 47 | + Given I visit "src/main.php" in project "without-composer" |
| 48 | + THen guessing the class name for "src/ClassMapNs/MyClass.php" should return "ClassMapNs\MyClass" |
| 49 | + |
| 50 | + |
| 51 | + Scenario: Load a class the doesn't exist |
| 52 | + Given I visit "src/main.php" in project "without-composer" |
| 53 | + Then the class "Psr4Ns\DoesNotExist" should not be detected |
0 commit comments