Skip to content

Commit b636e86

Browse files
authored
Merge pull request #1 from bytes-commerce/add-tests
Add tests.
2 parents 48fc38c + 060d38e commit b636e86

6 files changed

Lines changed: 49 additions & 92 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535
},
3636
"require-dev": {
37-
"phpunit/phpunit": "^11.5",
37+
"phpunit/phpunit": "^9.6.22",
3838
"rector/rector": "^2.0",
3939
"phpstan/phpstan": "^2.1"
4040
},

phpunit.xml.dist

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="tests/bootstrap.php"
9+
>
10+
<php>
11+
<ini name="display_errors" value="1" />
12+
<ini name="error_reporting" value="-1" />
13+
<server name="APP_ENV" value="test" force="true" />
14+
<server name="SHELL_VERBOSITY" value="-1" />
15+
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
16+
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
17+
</php>
18+
19+
<testsuites>
20+
<testsuite name="Symfony Test Files">
21+
<directory>tests</directory>
22+
<exclude>src/Field/Configurator</exclude>
23+
<exclude>src/Subscriber</exclude>
24+
</testsuite>
25+
</testsuites>
26+
27+
<coverage processUncoveredFiles="true">
28+
<include>
29+
<directory suffix=".php">src</directory>
30+
</include>
31+
<exclude>
32+
<directory suffix=".php">src/Field/Configurator</directory>
33+
<directory suffix=".php">src/Subscriber</directory>
34+
<file>src/FileUploadFieldBundle.php</file>
35+
</exclude>
36+
</coverage>
37+
</phpunit>

src/Field/Configurator/FileConfigurator.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

tests/PhpUnit/Field/Configurator/FileConfiguratorTest.php

Whitespace-only changes.

tests/PhpUnit/Subscriber/TemplateRegisterSubscriberTest.php

Whitespace-only changes.

tests/bootstrap.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
use Symfony\Component\Dotenv\Dotenv;
4+
5+
require dirname(__DIR__).'/vendor/autoload.php';
6+
7+
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
8+
require dirname(__DIR__).'/config/bootstrap.php';
9+
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
10+
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
11+
}

0 commit comments

Comments
 (0)