Skip to content
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

Support symfony 7 and add github action for PHPUnit #14

Merged
merged 3 commits into from
Jun 27, 2024
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
38 changes: 38 additions & 0 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PHPUnit

on:
push:
branches: [ main ]
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
run:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: true
matrix:
include:
- php: '8.1'
composer: 'composer:v2'
- php: '8.2'
composer: 'composer:v2'
- php: '8.3'
composer: 'composer:v2'

name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: ${{ matrix.composer }}

- name: Composer install
run: composer install

- name: PHPUnit tests
run: ./bin/phpunit --verbose --debug
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"php": "^8.1",
"php-amqplib/php-amqplib": "^3.0.0",
"doctrine/annotations": "^1.13.3|^2.0.1",
"symfony/event-dispatcher": "^4.4|^5.0|^6.0",
"symfony/event-dispatcher": "^6.4|^7.0",
"doctrine/collections": "^1.6|^2.1.2"
},
"require-dev": {
"jms/serializer": "^3.15.0",
"phpunit/phpunit": "^9.5.10",
"codeception/verify": "^2.1.1",
"league/statsd": "~1.5",
"symfony/stopwatch": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0",
"symfony/stopwatch": "^6.4|^7.0",
"symfony/serializer": "^6.4|^7.0",
"psr/log": "^1.0",
"phpspec/prophecy-phpunit": "^2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function invoke_should_invoke_reflection()
$consumer = new Consumer();

$reflectionMethod = $this->prophesize(ReflectionMethod::class);
$reflectionMethod->invoke($consumer, $payload)->shouldBeCalled();
$reflectionMethod->invoke($consumer, $payload)->willReturn('');

$container = new ConsumerContainer(
self::TEST_PREFIX,
Expand All @@ -36,6 +36,9 @@ public function invoke_should_invoke_reflection()
new ConsumerAnnotation('name')
);
$container->invoke($payload);

$reflectionMethod->invoke($consumer, $payload)->shouldHaveBeenCalled();

}

/**
Expand Down