|
@@ 118-131 (lines=14) @@
|
| 115 |
|
$this->assertContains($this->root->getChild('lib/MyClassB.php')->url(), $files); |
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
public function testFromPsr4WithNestedDirectory() |
| 119 |
|
{ |
| 120 |
|
vfsStream::create([ |
| 121 |
|
'composer.json' => '{"autoload": {"psr-4": {"MyNamespace\\\\": ["src/MyNamespace"]}}}', |
| 122 |
|
'src' => [ |
| 123 |
|
'MyNamespace' => ['MyClassA.php' => '<?php namespace MyNamespace; class MyClassA {}'] |
| 124 |
|
], |
| 125 |
|
]); |
| 126 |
|
|
| 127 |
|
$files = $this->files($this->root->getChild('composer.json')->url()); |
| 128 |
|
|
| 129 |
|
$this->assertCount(1, $files); |
| 130 |
|
$this->assertContains($this->root->getChild('src/MyNamespace/MyClassA.php')->url(), $files); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
public function testFromPsr4WithNestedDirectoryAlternativeDirectorySeparator() |
| 134 |
|
{ |
|
@@ 133-146 (lines=14) @@
|
| 130 |
|
$this->assertContains($this->root->getChild('src/MyNamespace/MyClassA.php')->url(), $files); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
public function testFromPsr4WithNestedDirectoryAlternativeDirectorySeparator() |
| 134 |
|
{ |
| 135 |
|
vfsStream::create([ |
| 136 |
|
'composer.json' => '{"autoload": {"psr-4": {"MyNamespace\\\\": ["src\\\\MyNamespace"]}}}', |
| 137 |
|
'src' => [ |
| 138 |
|
'MyNamespace' => ['MyClassA.php' => '<?php namespace MyNamespace; class MyClassA {}'] |
| 139 |
|
], |
| 140 |
|
]); |
| 141 |
|
|
| 142 |
|
$files = $this->files($this->root->getChild('composer.json')->url()); |
| 143 |
|
|
| 144 |
|
$this->assertCount(1, $files); |
| 145 |
|
$this->assertContains($this->root->getChild('src/MyNamespace/MyClassA.php')->url(), $files); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
/** |
| 149 |
|
* @return string[] |