Skip to content

Commit 7f32c5d

Browse files
committed
Merge branch 'new' into development
# Conflicts: # composer.json # docker-compose.yml
2 parents a2b5423 + 4212e2e commit 7f32c5d

File tree

7 files changed

+45
-42
lines changed

7 files changed

+45
-42
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
vendor/bin/phpstan analyse -vvv
4949

5050
- name: PHPUnit
51-
run: vendor/bin/phpunit --verbose
51+
run: vendor/bin/phpunit
5252

5353
- name: Upload coverage results to Coveralls
5454
env:
@@ -59,14 +59,14 @@ jobs:
5959
composer global require php-coveralls/php-coveralls
6060
php-coveralls --coverage_clover=build/logs/clover.xml -v
6161
62-
tests-last:
62+
tests-latest:
6363
runs-on: ubuntu-22.04
6464
timeout-minutes: 10
6565

6666
strategy:
6767
fail-fast: true
6868

69-
name: PHP 8.2 - Last
69+
name: PHP Latest
7070

7171
steps:
7272
- name: Checkout
@@ -75,7 +75,7 @@ jobs:
7575
- name: Setup PHP
7676
uses: shivammathur/setup-php@v2
7777
with:
78-
php-version: 8.2
78+
php-version: latest
7979
tools: composer
8080
coverage: xdebug
8181

@@ -84,4 +84,4 @@ jobs:
8484
composer update
8585

8686
- name: PHPUnit
87-
run: vendor/bin/phpunit --verbose
87+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build/
44
raw-tests/
55
vendor/
66
.php-cs-fixer.cache
7+
.phpunit.cache
78
.phpunit.result.cache
89
composer.lock
910
composer.phar

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ test:php:
3030
- build/docs/
3131
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
3232

33-
test:php-last:
34-
image: registry.gitlab.com/aplus-framework/images/base:3
33+
test:php-latest:
34+
image: registry.gitlab.com/aplus-framework/images/base:latest
3535
stage: test
3636
timeout: 10 minutes
3737
cache:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
"require-dev": {
4545
"ext-xdebug": "*",
4646
"aplus/coding-standard": "^2.0",
47-
"ergebnis/composer-normalize": "^2.37",
47+
"ergebnis/composer-normalize": "^2.25",
4848
"jetbrains/phpstorm-attributes": "^1.0",
4949
"phpmd/phpmd": "^2.14",
5050
"phpstan/phpstan": "^1.10",
51-
"phpunit/phpunit": "^9.6"
51+
"phpunit/phpunit": "^10.5"
5252
},
5353
"minimum-stability": "dev",
5454
"prefer-stable": true,

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ services:
77
volumes:
88
- .:/package
99
tty: true
10-
package-last:
11-
image: registry.gitlab.com/aplus-framework/images/package:3
12-
container_name: package-http-client-last
10+
package-latest:
11+
image: registry.gitlab.com/aplus-framework/images/package:latest
12+
container_name: package-http-client-latest
1313
working_dir: /package
1414
volumes:
1515
- .:/package

phpunit.xml.dist

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3-
bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true"
4-
convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false"
5-
stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7-
<coverage processUncoveredFiles="true">
8-
<include>
9-
<directory suffix=".php">src</directory>
10-
</include>
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false" stopOnFailure="false"
4+
stopOnIncomplete="false" stopOnSkipped="false"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
6+
cacheDirectory=".phpunit.cache">
7+
<coverage>
118
<report>
129
<clover outputFile="build/coverage/clover.xml"/>
1310
<html outputDirectory="build/coverage"/>
@@ -18,4 +15,9 @@
1815
<directory suffix="Test.php">tests</directory>
1916
</testsuite>
2017
<logging/>
18+
<source>
19+
<include>
20+
<directory suffix=".php">src</directory>
21+
</include>
22+
</source>
2123
</phpunit>

tests/ResponseTest.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,31 @@ public function testCookies() : void
132132
self::assertSame(['foo', 'baz'], \array_keys($response->getCookies()));
133133
}
134134

135+
/**
136+
* @dataProvider linksProvider
137+
*
138+
* @param string $header
139+
* @param array<string,string> $links
140+
*/
141+
public function testLinks(string $header, array $links) : void
142+
{
143+
$response = new Response(
144+
new Request('https://domain.tld'),
145+
'HTTP/1.1',
146+
200,
147+
'OK',
148+
[
149+
'link' => [$header],
150+
],
151+
''
152+
);
153+
self::assertSame($links, $response->getLinks());
154+
}
155+
135156
/**
136157
* @return array<array<mixed>>
137158
*/
138-
public function linksProvider() : array
159+
public static function linksProvider() : array
139160
{
140161
return [
141162
[
@@ -179,25 +200,4 @@ public function linksProvider() : array
179200
],
180201
];
181202
}
182-
183-
/**
184-
* @dataProvider linksProvider
185-
*
186-
* @param string $header
187-
* @param array<string,string> $links
188-
*/
189-
public function testLinks(string $header, array $links) : void
190-
{
191-
$response = new Response(
192-
new Request('https://domain.tld'),
193-
'HTTP/1.1',
194-
200,
195-
'OK',
196-
[
197-
'link' => [$header],
198-
],
199-
''
200-
);
201-
self::assertSame($links, $response->getLinks());
202-
}
203203
}

0 commit comments

Comments
 (0)