Skip to content

fix http error already sent in tests #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 1, 2025
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: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
name: CI
on: [push, pull_request]

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
run:
strategy:
matrix:
include:
- php: '7.4'
- php: '8.0'
- php: '8.1'
- php: '8.2'
- php: '8.3'
- php: '8.4'

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"

- name: Install dependencies
run: composer self-update && composer install && composer dump-autoload

- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml .

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
env:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"php": ">=7.4",
"ext-json": "*",
"ext-mbstring": "*",
"laminas/laminas-diactoros": "^2",
"laminas/laminas-diactoros": "^3",
"miladrahimi/phpcontainer": "^5"
},
"require-dev": {
Expand Down
2 changes: 2 additions & 0 deletions tests/Features/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
class ViewTest extends TestCase
{
/**
* @runInSeparateProcess
* @throws Throwable
*/
public function test_with_the_sample_view()
Expand All @@ -28,6 +29,7 @@ public function test_with_the_sample_view()
}

/**
* @runInSeparateProcess
* @throws Throwable
*/
public function test_with_the_sample_view_and_status_201_and_headers()
Expand Down
1 change: 1 addition & 0 deletions tests/Units/HttpPublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function test_publish_a_array_response()
}

/**
* @runInSeparateProcess
* @throws Throwable
*/
public function test_publish_a_standard_response()
Expand Down