Skip to content

Commit 10732a5

Browse files
Fix inconsistencies (#22)
Co-authored-by: LucianDex <[email protected]>
1 parent aa79366 commit 10732a5

16 files changed

+9586
-539
lines changed

.github/workflows/laravel.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ env:
1212
APP_ENV: test
1313

1414
jobs:
15-
symfony:
15+
laravel:
1616
name: Laravel 8 (PHP ${{ matrix.php-versions }})
1717
runs-on: ubuntu-latest
1818
strategy:
1919
fail-fast: true
2020
matrix:
2121
php-versions: ['7.4', '8.0', '8.1']
2222
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v2.4.0
23+
- name: Checkout code
24+
uses: actions/checkout@v3
2525

26-
- name: Setup PHP with extensions and Composer v2
26+
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2
2828
with:
2929
php-version: ${{ matrix.php-versions }}
@@ -46,10 +46,12 @@ jobs:
4646
- name: Install Composer dependencies
4747
run: composer update --no-progress
4848

49-
- name: Run functional tests
49+
- name: Set up Laravel environment
5050
run: |
5151
cp .env.testing .env
5252
php artisan config:cache
5353
touch database/database.sqlite
5454
php artisan migrate --seed --env=testing --force
55-
vendor/bin/codecept run Functional
55+
56+
- name: Run functional tests
57+
run: vendor/bin/codecept run Functional

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
.phpunit.result.cache
1313
.phpstorm.meta.php
1414
_ide_helper.php
15-
composer.lock
1615
Homestead.json
1716
Homestead.yaml
1817
npm-debug.log

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ Then, go to the project directory and run:
3737
vendor/bin/codecept run Functional
3838
```
3939

40+
### Navigate the application locally through a web browser
41+
42+
If for any reason you want to run the Laravel app in a browser, you should compile the assets:
43+
44+
```shell
45+
yarn install
46+
yarn run dev
47+
```
48+
4049
### Create Unit Suite or Acceptance Suite
4150

4251
To create [Unit Tests](https://codeception.com/docs/05-UnitTests) or [Acceptance Tests](https://codeception.com/docs/03-AcceptanceTests), you need to create the corresponding suite first:

app/Http/Controllers/TestController.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ public function testValue(): string
2424

2525
public function testHeaders(Request $request): string
2626
{
27-
$result = '';
28-
29-
foreach ($request->headers->all() as $key => $value) {
30-
$result .= $key . ': ' . $value[0] . "\n";
31-
}
32-
33-
return $result;
27+
return collect($request->headers->all())
28+
->map(fn($value, $key) => "$key: $value[0]")
29+
->implode("\n");
3430
}
3531

3632
/** @return array<string, array<bool|int>> */

composer.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,28 @@
1212
"require": {
1313
"php": ">=7.4.0",
1414
"ext-pdo": "*",
15-
"laravel/framework": "^8.75",
15+
"laravel/framework": "^8.83",
1616
"laravel/ui": "^3.4"
1717
},
1818
"require-dev": {
1919
"ext-fileinfo": "*",
2020
"ext-json": "*",
21-
"barryvdh/laravel-debugbar": "^3.6",
22-
"barryvdh/laravel-ide-helper": "^2.10",
23-
"codeception/codeception": "^4.1 | ^5.0.0-RC2",
21+
"barryvdh/laravel-debugbar": "^3.7",
22+
"barryvdh/laravel-ide-helper": "^2.14",
23+
"codeception/codeception": "^4.1 | ^5.0.0-RC3",
2424
"codeception/module-asserts": "^2.0 | ^3.0",
2525
"codeception/module-laravel": "^2.1 | ^3.0 | *@dev",
2626
"facade/ignition": "^2.17",
27-
"fakerphp/faker": "^1.17",
28-
"nunomaduro/collision": "^5.10"
27+
"fakerphp/faker": "^1.24",
28+
"nunomaduro/collision": "^5.11"
2929
},
3030
"config": {
3131
"optimize-autoloader": true,
3232
"preferred-install": "dist",
33-
"sort-packages": true
33+
"sort-packages": true,
34+
"platform": {
35+
"php": "7.4.0"
36+
}
3437
},
3538
"extra": {
3639
"laravel": {

0 commit comments

Comments
 (0)