Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3699e8c

Browse files
committed
Tests: fix composer autoload
1. Make the namespace of the `VariableAnalysisTest` file reflect the path the file. 2. Add an `autoload-dev` section to the `composer.json` * The unit tests are not shipped in the distribution package, so they are only available in a `dev` environment, which is exactly what `autoload-dev` is targetting. * Setting the `tests` directory as a secondary path for PSR4 autoload should fix compatibility with Composer 2.
1 parent 4804a39 commit 3699e8c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎composer.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"VariableAnalysis\\": "VariableAnalysis/"
2727
}
2828
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"VariableAnalysis\\Tests\": "tests/"
32+
}
33+
},
2934
"minimum-stability": "dev",
3035
"prefer-stable": true,
3136
"scripts": {

‎tests/Sniffs/VariableAnalysisTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
namespace VariableAnalysis\Tests\CodeAnalysis;
2+
namespace VariableAnalysis\Tests\Sniffs;
33

44
use VariableAnalysis\Tests\BaseTestCase;
55

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /