Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0473a21
remove: phpunit removed from composer
kamarton Dec 28, 2024
e6cb7a7
enh: phpunit -> pest (CI / README.md)
kamarton Dec 28, 2024
2dfd2bf
fix: CI job name (phpunit -> pest)
kamarton Dec 28, 2024
2c67c53
Merge branch 'main' into 13-pest-test
kamarton Dec 28, 2024
c8ce5ea
enh: add declare(strict_types=1)
kamarton Dec 30, 2024
3b7fc1f
remove: not used TestCase php
kamarton Dec 30, 2024
5d68fbb
comment: TimeHelper#durationToSeconds added php doc for months and ye…
kamarton Dec 30, 2024
009a84b
enh: TimeHelper#toTimestamp more validation added
kamarton Dec 30, 2024
6e081fd
refactor: TimeHelperTest.php rewrite with php pest
kamarton Dec 30, 2024
e63aa9c
fix: not necessary type check (PHPStan)
kamarton Dec 30, 2024
8571f76
composer: mockery/mockery added
kamarton Dec 30, 2024
bcbe266
refactor: HttpHeaderHelperTest.php with pest
kamarton Dec 30, 2024
9135dea
comment: add phpdoc note to replaceHeaders
kamarton Jan 1, 2025
7052317
enh: MatcherHeaderAbstract.php header property changed to getHeaders
kamarton Jan 1, 2025
254424e
remove: MatcherHeaderAbstractMock.php not needed thanks to Mockery
kamarton Jan 1, 2025
fab64a9
fix: MatcherHeaderAbstractTest#withHeaders initial headers changed
kamarton Jan 1, 2025
6aaff6f
refactor: ETagMatcherTest.php with php pest
kamarton Jan 2, 2025
93ec7ff
enh: ModifiedMatcher with DateMalformedStringException
kamarton Jan 3, 2025
cc1211b
refactor: ModifiedMatcherTest.php phpunit -> php pest
kamarton Jan 3, 2025
12ecef2
refactor: coverage with PHP pest (CI)
kamarton Jan 3, 2025
0418afd
enh: run coverage actions on all branch
kamarton Jan 4, 2025
991ae24
refactor: ETagHeaderBuilderTest.php phpunit -> pest
kamarton Jan 4, 2025
7592662
fix: ETagHeaderBuilder#etag() set and null set not working
kamarton Jan 4, 2025
ec062fa
enh: improve ETagHeaderBuilder coverage
kamarton Jan 4, 2025
77c0009
enh: HttpHeaderHelper tests
kamarton Jan 4, 2025
c9b32bd
enh: ETagHeaderBuilder ignore coverage line
kamarton Jan 4, 2025
0dbd9f0
enh: ModifiedMatcher ignore coverage line
kamarton Jan 4, 2025
d22b60f
enh: CacheHeaderBuilder#etag() with more argument check
kamarton Jan 4, 2025
ea67e41
enh: CacheHeaderBuilder added pest test
kamarton Jan 4, 2025
a017982
fix: CacheHeaderBuilder#etag() static return and simplify code
kamarton Jan 4, 2025
e81d84c
fix: TimeHelper#toTimstamp if empty string then throw \InvalidArgumen…
kamarton Jan 5, 2025
57f5e80
fix: TimeHelper#toTimstamp DateMailformedStringException with specifi…
kamarton Jan 5, 2025
5cecadc
enh: more added pest tests
kamarton Jan 5, 2025
2e97214
enh: more added pest tests (CacheHeaderBuilder)
kamarton Jan 5, 2025
73cb421
enh: more added pest tests (CacheHeaderBuilder)
kamarton Jan 5, 2025
1c57321
enh: more added pest tests (CacheHeaderBuilder)
kamarton Jan 5, 2025
583d092
fix: StaleWhileRevalidateTest test name and with based tests
kamarton Jan 5, 2025
53032d8
enh: CacheHeaderBuilder ignore coverage lines
kamarton Jan 5, 2025
1bafaf6
enh: CacheHeaderBuilder#etag()/withEtag() empty and blank etag tests
kamarton Jan 5, 2025
4f721b5
remove: CacheHeaderBuilderTest phpunit tests
kamarton Jan 5, 2025
1cb2cfa
rename: ETagMatcher#ifMatchHeader -> ifMatchHeaderValue / withIfMatch…
kamarton Jan 6, 2025
605d045
enh: more php pest tests added
kamarton Jan 6, 2025
44e3c40
enh: more php pest tests added
kamarton Jan 8, 2025
90c1c93
enh: CI pest parallel run
kamarton Jan 8, 2025
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
8 changes: 3 additions & 5 deletions .github/workflows/coverals-and-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Run coveralls and codecov

on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
Expand All @@ -12,7 +10,7 @@ on:
- 'doc/**'

jobs:
phpunit:
coverage:
runs-on: ubuntu-latest

steps:
Expand All @@ -31,8 +29,8 @@ jobs:
- name: Configure Xdebug
run: echo "xdebug.mode=coverage" >> $GITHUB_ENV

- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Run PHP Pest tests
run: vendor/bin/pest --coverage-clover=coverage.xml --parallel

- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/phpunit.yml → .github/workflows/pest.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Run PHPUnit Tests
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'doc/**'
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 8.2, 8.3, 8.4 ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist
- name: Configure Xdebug
run: echo "xdebug.mode=coverage" >> $GITHUB_ENV
- name: Run PHPUnit
run: vendor/bin/phpunit
name: Run Pest Tests

on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'doc/**'

jobs:
pest:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ 8.2, 8.3, 8.4 ]

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist

- name: Configure Xdebug
run: echo "xdebug.mode=coverage" >> $GITHUB_ENV

- name: Run Pest
run: vendor/bin/pest --parallel
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## dev

- enh: custom DateMalFormedStringException added
- fix: ETagHeaderBuilder#etag() etag set and already set with null -> null etag not stored
- rename: ETagMatcher#ifMatchHeader() -> ETagMatcher#ifMatchHeaderValue()
- rename: ETagMatcher#withIfMatchHeader() -> ETagMatcher#withIfMatchHeaderValue()

## 0.5.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![GitHub Release](https://img.shields.io/github/v/release/smartondev/httpcache?include_prereleases)
[![GitHub License](https://img.shields.io/github/license/smartondev/httpcache)](LICENSE)
![PHPUnit - GitHub Actions](https://img.shields.io/github/actions/workflow/status/smartondev/httpcache/phpunit.yml?label=tests)
![Pest - GitHub Actions](https://img.shields.io/github/actions/workflow/status/smartondev/httpcache/phpunit.yml?label=tests)
![PHPStan level 10 - GitHub Actions](https://img.shields.io/github/actions/workflow/status/smartondev/httpcache/phpstan.yml?label=PHPStan%20level%2010)
[![Coverage Status](https://img.shields.io/coverallsCoverage/github/smartondev/httpcache?label=coveralls)](https://coveralls.io/github/smartondev/httpcache?branch=main)
[![Codecov](https://img.shields.io/codecov/c/github/smartondev/httpcache?label=codecov)](https://app.codecov.io/gh/smartondev/httpcache)
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"php": "^8.2"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"phpstan/phpstan": "^2.0"
"phpstan/phpstan": "^2.0",
"pestphp/pest": "^3.7",
"mockery/mockery": "^1.6"
},
"autoload": {
"psr-4": {
Expand All @@ -25,5 +26,10 @@
"psr-4": {
"SmartonDev\\HttpCache\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
Loading
Loading