Skip to content

Commit e53168e

Browse files
Merge pull request #3 from WebdevCave/feature/tests-coverage
Feature/tests coverage
2 parents d938523 + 5d48fb6 commit e53168e

File tree

11 files changed

+1967
-1891
lines changed

11 files changed

+1967
-1891
lines changed

.github/workflows/php.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
1919

20-
- name: Validate composer.json and composer.lock
21-
run: composer validate --strict
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
2222

23-
- name: Cache Composer packages
24-
id: composer-cache
25-
uses: actions/cache@v3
26-
with:
27-
path: vendor
28-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-php-
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: vendor
28+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-php-
3131
32-
- name: Install dependencies
33-
run: composer install --prefer-dist --no-progress
32+
- name: Install dependencies
33+
run: composer install --prefer-dist --no-progress
3434

35-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36-
# Docs: https://getcomposer.org/doc/articles/scripts.md
35+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36+
# Docs: https://getcomposer.org/doc/articles/scripts.md
3737

38-
- name: Run test suite
39-
run: composer run-script test
38+
- name: Run test suite
39+
run: composer run-script test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/vendor/
2+
.phpunit.cache/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ var_dump($container->get(MyController::class)->save()); //bool(true)
7070
```
7171

7272
## Contributing
73+
7374
Contributions are welcome! If you find any issues or have suggestions for improvements,
7475
please open an issue or a pull request on GitHub.
7576

7677
## License
78+
7779
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
"description": "Yet another dependency injection container for PHP",
44
"type": "library",
55
"license": "MIT",
6-
"keywords": ["php", "dependency-injection", "autowiring", "repository", "container", "service-container"],
6+
"keywords": [
7+
"php",
8+
"dependency-injection",
9+
"autowiring",
10+
"repository",
11+
"container",
12+
"service-container"
13+
],
714
"autoload": {
815
"psr-4": {
916
"Webdevcave\\Yadic\\": "src/"
@@ -31,7 +38,7 @@
3138
"phpunit/phpunit": "^10"
3239
},
3340
"scripts": {
34-
"test": "./vendor/bin/phpunit ./tests"
41+
"test": "XDEBUG_MODE=coverage ./vendor/bin/phpunit"
3542
},
3643
"scripts-descriptions": {
3744
"test": "Run PHPUNIT tests"

0 commit comments

Comments
 (0)