Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ env:
APP_ENV: test

jobs:
symfony:
laravel:
name: Laravel 8 (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php-versions: ['7.4', '8.0', '8.1']
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Checkout code
uses: actions/checkout@v3

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

- name: Run functional tests
- name: Set up Laravel environment
run: |
cp .env.testing .env
php artisan config:cache
touch database/database.sqlite
php artisan migrate --seed --env=testing --force
vendor/bin/codecept run Functional

- name: Run functional tests
run: vendor/bin/codecept run Functional
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
.phpunit.result.cache
.phpstorm.meta.php
_ide_helper.php
composer.lock
Homestead.json
Homestead.yaml
npm-debug.log
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ Then, go to the project directory and run:
vendor/bin/codecept run Functional
```

### Navigate the application locally through a web browser

If for any reason you want to run the Laravel app in a browser, you should compile the assets:

```shell
yarn install
yarn run dev
```

### Create Unit Suite or Acceptance Suite

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:
Expand Down
10 changes: 3 additions & 7 deletions app/Http/Controllers/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ public function testValue(): string

public function testHeaders(Request $request): string
{
$result = '';

foreach ($request->headers->all() as $key => $value) {
$result .= $key . ': ' . $value[0] . "\n";
}

return $result;
return collect($request->headers->all())
->map(fn($value, $key) => "$key: $value[0]")
->implode("\n");
}

/** @return array<string, array<bool|int>> */
Expand Down
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,28 @@
"require": {
"php": ">=7.4.0",
"ext-pdo": "*",
"laravel/framework": "^8.75",
"laravel/framework": "^8.83",
"laravel/ui": "^3.4"
},
"require-dev": {
"ext-fileinfo": "*",
"ext-json": "*",
"barryvdh/laravel-debugbar": "^3.6",
"barryvdh/laravel-ide-helper": "^2.10",
"codeception/codeception": "^4.1 | ^5.0.0-RC2",
"barryvdh/laravel-debugbar": "^3.7",
"barryvdh/laravel-ide-helper": "^2.14",
"codeception/codeception": "^4.1 | ^5.0.0-RC3",
"codeception/module-asserts": "^2.0 | ^3.0",
"codeception/module-laravel": "^2.1 | ^3.0 | *@dev",
"facade/ignition": "^2.17",
"fakerphp/faker": "^1.17",
"nunomaduro/collision": "^5.10"
"fakerphp/faker": "^1.24",
"nunomaduro/collision": "^5.11"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"platform": {
"php": "7.4.0"
}
},
"extra": {
"laravel": {
Expand Down
Loading
Loading