Skip to content

Commit 98b27d6

Browse files
oliverkleeSam Tuke
authored andcommitted
[CLEANUP] Rename Tests/ to tests/ (#92)
This brings the project more in line with the default Symfony project structure.
1 parent b0a3f4c commit 98b27d6

18 files changed

+15
-14
lines changed

.github/CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ code coverage of the fixed bugs and the new features.
7979
To run the existing unit tests, run this command:
8080

8181
```bash
82-
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Unit/
82+
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml tests/Unit/
8383
```
8484

8585
### Running the integration tests
@@ -100,7 +100,7 @@ When running the integration tests, you will need to specify the database name
100100
and access credentials on the command line (in the same line):
101101

102102
```bash
103-
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
103+
PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml tests/Integration/
104104
```
105105

106106

@@ -116,7 +116,7 @@ We will only merge pull requests that follow the project's coding style.
116116
Please check your code with the provided PHP_CodeSniffer standard:
117117

118118
```bash
119-
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
119+
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/
120120
```
121121

122122
Please also check the code structure using PHPMD:
@@ -128,13 +128,13 @@ vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/
128128
And also please run the static code analysis:
129129

130130
```bash
131-
vendor/bin/phpstan analyse -l 5 Classes/ Tests/
131+
vendor/bin/phpstan analyse -l 5 Classes/ tests/
132132
```
133133

134134
You can also run all code style checks using one long line from a bash shell:
135135

136136
```bash
137-
find Classes/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
137+
find Classes/ tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/
138138
```
139139

140140
This will execute all tests except for the unit tests and the integration

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Are your changes covered with unit tests, and do they not break anything?
1212

1313
You can run the existing unit tests using this command:
1414

15-
vendor/bin/phpunit Tests/
15+
vendor/bin/phpunit tests/
1616

1717

1818
### Code style
@@ -22,7 +22,7 @@ style?
2222

2323
You can check for this using this command:
2424

25-
vendor/bin/phpcs --standard=PSR2 Classes/ Tests/
25+
vendor/bin/phpcs --standard=PSR2 Classes/ tests/
2626

2727

2828
### Other Information

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ script:
6161
- >
6262
echo;
6363
echo "Linting all PHP files";
64-
find Classes/ Tests/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l;
64+
find Classes/ tests/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l;
6565
6666
- >
6767
echo;
6868
echo "Running the unit tests";
69-
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Unit/;
69+
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml tests/Unit/;
7070
7171
- >
7272
echo;
7373
echo "Running the integration tests";
74-
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/;
74+
vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml tests/Integration/;
7575
7676
- >
7777
echo;
7878
echo "Running the static analysis";
79-
vendor/bin/phpstan analyse -l 5 Classes/ Tests/;
79+
vendor/bin/phpstan analyse -l 5 Classes/ tests/;
8080
8181
- >
8282
echo;
@@ -86,4 +86,4 @@ script:
8686
- >
8787
echo;
8888
echo "Running PHP_CodeSniffer";
89-
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/;
89+
vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/;

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1212
- REST action for getting all subscribers for a list (#83)
1313

1414
### Changed
15+
- Adopt more of the default Symfony project structure (#92)
1516

1617
### Deprecated
1718

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"autoload-dev": {
5151
"psr-4": {
52-
"PhpList\\RestBundle\\Tests\\": "Tests/"
52+
"PhpList\\RestBundle\\Tests\\": "tests/"
5353
}
5454
},
5555
"scripts": {
@@ -84,7 +84,7 @@
8484
"symfony-bin-dir": "bin",
8585
"symfony-var-dir": "var",
8686
"symfony-web-dir": "web",
87-
"symfony-tests-dir": "Tests",
87+
"symfony-tests-dir": "tests",
8888
"phplist/phplist4-core": {
8989
"bundles": [
9090
"FOS\\RestBundle\\FOSRestBundle",
File renamed without changes.

Tests/Integration/Controller/AbstractControllerTest.php renamed to tests/Integration/Controller/AbstractControllerTest.php

File renamed without changes.

Tests/Integration/Controller/Fixtures/Administrator.csv renamed to tests/Integration/Controller/Fixtures/Administrator.csv

File renamed without changes.

Tests/Integration/Controller/Fixtures/AdministratorToken.csv renamed to tests/Integration/Controller/Fixtures/AdministratorToken.csv

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)