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

Replace simple-phpunit with phpunit #31

Merged
merged 4 commits into from
Sep 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
19 changes: 1 addition & 18 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,27 @@ jobs:
- php-version: '7.2'
dependency-versions: 'lowest'
tools: 'composer:v1'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14

- php-version: '7.4'
dependency-versions: 'highest'
tools: 'composer:v2'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14

- php-version: '8.0'
dependency-versions: 'highest'
tools: 'composer:v2'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14 phpspec/prophecy-phpunit:^2.0

- php-version: '8.1'
dependency-versions: 'highest'
tools: 'composer:v2'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14 phpspec/prophecy-phpunit:^2.0

- php-version: '8.2'
dependency-versions: 'highest'
tools: 'composer:v2'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14 phpspec/prophecy-phpunit:^2.0

- php-version: '8.3'
dependency-versions: 'highest'
minimum-stability: 'dev'
tools: 'composer:v2'
envs:
SYMFONY_PHPUNIT_REQUIRE: phpspec/prophecy:^1.14 phpspec/prophecy-phpunit:^2.0

steps:
- name: Checkout project
Expand All @@ -72,13 +60,8 @@ jobs:
with:
dependency-versions: ${{matrix.dependency-versions}}

- name: Install PHPUnit
run: vendor/bin/simple-phpunit install
env:
SYMFONY_PHPUNIT_REQUIRE: ${{ matrix.envs.SYMFONY_PHPUNIT_REQUIRE }}

- name: Execute test cases
run: vendor/bin/simple-phpunit
run: vendor/bin/phpunit

lint:
name: 'PHP Lint'
Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/BuildRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BuildRegistryTest extends BaseTestCase
*/
private $buildRegistry;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/BuilderContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BuilderContextTest extends BaseTestCase
protected $input;
protected $output;

public function setUp()
public function setUp(): void
{
parent::setUp();
$this->input = $this->prophesize('Symfony\Component\Console\Input\InputInterface');
Expand Down
5 changes: 3 additions & 2 deletions Tests/Builder/VirtualBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
* with this source code in the file LICENSE.
*/

namespace Massive\Bundle\BuildBundle\Builder;
namespace Massive\Bundle\BuildBundle\Tests\Builder;

use Massive\Bundle\BuildBundle\Builder\VirtualBuilder;
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;

class VirtualBuilderTest extends BaseTestCase
{
protected $builder;

public function setUp()
public function setUp(): void
{
$this->builder = new VirtualBuilder('builder', ['one', 'two', 'three']);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Command/BuildCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BuildCommandTest extends BaseTestCase
{
use ProphecyTrait;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.4.33|^6.3.10|^7.0.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0"
"phpunit/phpunit": "^8.5",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"phpspec/prophecy": "^1.14"
},
"autoload": {
"psr-4": {"Massive\\Bundle\\BuildBundle\\": "."},
Expand Down
7 changes: 0 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@
</exclude>
</whitelist>
</filter>

<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
<env name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml"/>
<env name="SYMFONY_PHPUNIT_REQUIRE" value="phpspec/prophecy:^1.14"/>
</php>
</phpunit>
Loading