Skip to content

Commit 70f5b25

Browse files
Fix: Add unit tests for controllers and Components (Contact, Hello, Identity, Menu). (#92)
1 parent c480ee3 commit 70f5b25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9620
-853
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ jobs:
2222
uses: php-forge/actions/.github/workflows/codeception.yml@main
2323
secrets:
2424
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2526
with:
27+
coverage-file: runtime/output/coverage.xml
2628
extensions: gd, intl
27-
os: >-
28-
['ubuntu-latest', 'windows-latest']
29-
php: >-
30-
['8.1', '8.2', '8.3', '8.4']

.github/workflows/dependency-check.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ jobs:
2222
uses: php-forge/actions/.github/workflows/composer-require-checker.yml@main
2323
secrets:
2424
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
25-
with:
26-
os: >-
27-
['ubuntu-latest']
28-
php: >-
29-
['8.4']

.github/workflows/ecs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,3 @@ jobs:
2222
uses: php-forge/actions/.github/workflows/ecs.yml@main
2323
with:
2424
extensions: mbstring
25-
os: >-
26-
['ubuntu-latest']
27-
php: >-
28-
['8.4']

.github/workflows/static.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,4 @@ jobs:
2323
secrets:
2424
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
2525
with:
26-
os: >-
27-
['ubuntu-latest']
28-
php: >-
29-
['8.1', '8.2', '8.3', '8.4']
26+
hook: vendor/bin/codecept build

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
3+
## 0.1.0 Under development
4+
5+
- Initial release

codeception.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
namespace: App\Tests
1+
namespace: app\tests
22
bootstrap: _bootstrap.php
33
support_namespace: Support
44
paths:
5-
tests: tests
6-
output: tests/_output
7-
data: tests/Support/Data
8-
support: tests/Support
9-
envs: tests/_envs
5+
tests: tests
6+
output: runtime/output
7+
data: tests/Support/data
8+
support: tests/Support
9+
envs: runtime/_envs
1010
actor_suffix: Tester
1111
settings:
12-
memory_limit: 1024M
13-
colors: true
12+
memory_limit: 1024M
13+
colors: true
1414
modules:
15-
config:
16-
Yii2:
17-
configFile: 'config/build-test.php'
15+
config:
16+
Yii2:
17+
configFile: config/web/app.php
1818
extensions:
19-
enabled:
20-
- Codeception\Extension\RunFailed
19+
enabled:
20+
- Codeception\Extension\RunFailed
2121
coverage:
22-
enabled: true
23-
whitelist:
24-
include:
25-
- src/*
22+
enabled: true
23+
whitelist:
24+
include:
25+
- src/*

composer.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@
99
"yii2"
1010
],
1111
"license": "mit",
12-
"minimum-stability": "dev",
13-
"prefer-stable": true,
1412
"require": {
1513
"php": ">=8.1",
1614
"php-forge/foxy": "^0.1",
1715
"ui-awesome/html": "^0.3",
1816
"ui-awesome/html-component-bootstrap5": "^1.0@dev",
1917
"ui-awesome/html-svg":"^0.2",
2018
"yii2-extensions/localeurls": "^0.1.0",
21-
"yiisoft/config": "^1.4",
22-
"yiisoft/yii2": "22.0.x-dev",
23-
"yiisoft/yii2-bootstrap5": "22.x-dev",
24-
"yiisoft/yii2-symfonymailer": "22.x-dev"
19+
"yiisoft/yii2": "^2.0.53|^22",
20+
"yiisoft/yii2-bootstrap5": "^2.0.50|^22",
21+
"yiisoft/yii2-symfonymailer": "^4.0|^22"
2522
},
2623
"require-dev": {
2724
"codeception/c3": "^2.8",
@@ -38,9 +35,9 @@
3835
"symfony/browser-kit": "^6.3",
3936
"symfony/process": "^6.3",
4037
"symplify/easy-coding-standard": "^12.3",
41-
"yii2-extensions/phpstan": "^0.2.3",
42-
"yiisoft/yii2-debug": "22.x-dev",
43-
"yiisoft/yii2-gii": "22.x-dev"
38+
"yii2-extensions/phpstan": "^0.3.0",
39+
"yiisoft/yii2-debug": "^2.1.27|^22",
40+
"yiisoft/yii2-gii": "^2.2.7|^22"
4441
},
4542
"autoload": {
4643
"psr-4": {
@@ -52,18 +49,23 @@
5249
"app\\tests\\": "tests/"
5350
}
5451
},
52+
"provide": {
53+
"bower-asset/inputmask": "5.0.9",
54+
"bower-asset/jquery": "3.6.1",
55+
"bower-asset/punycode": "^1.4",
56+
"bower-asset/yii2-pjax": "~2.0.1",
57+
"bower-asset/bootstrap": "^5.2"
58+
},
5559
"extra": {
5660
"branch-alias": {
5761
"dev-master": "0.1-dev"
58-
},
59-
"config-plugin-file": "/config/config-plugin.php"
62+
}
6063
},
6164
"config": {
6265
"allow-plugins": {
6366
"codeception/c3": true,
6467
"yiisoft/yii2-composer": true,
6568
"composer/installers": true,
66-
"yiisoft/config": true,
6769
"php-forge/foxy": true,
6870
"phpstan/extension-installer": true
6971
}

0 commit comments

Comments
 (0)