Skip to content

Commit 0986a44

Browse files
committed
Check coding standards and static analysis of tests
1 parent 35aab31 commit 0986a44

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/workflows/ci-linux.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
- name: CS
9090
run: |
9191
cd galette-core/galette/plugins/plugin-helloasso
92-
../../vendor/bin/phpcs lib/ ./*.php
92+
../../vendor/bin/phpcs lib/ tests/ ./*.php
9393
9494
- name: CS Fixer
9595
if: matrix.php-is-min

‎.php-cs-fixer.dist.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
->in([
55
__DIR__ . '/lib',
66
__DIR__ . '/tests',
7+
__DIR__ . '/tests',
78
])
89
;
910

‎phpstan.neon‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ parameters:
44
level: 6
55
paths:
66
- lib/
7+
- tests/
78
scanFiles:
89
- _config.inc.php
910
- ../../includes/sys_config/paths.inc.php

‎tests/GaletteHelloasso/tests/units/Helloasso.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* SPDX-License-Identifier: GPL-3.0-or-later
77
*/
88

9+
declare(strict_types=1);
10+
911
namespace GaletteHelloasso\tests\units;
1012

1113
use Galette\Tests\GaletteTestCase;

‎tests/TestsBootstrap.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
* SPDX-License-Identifier: GPL-3.0-or-later
77
*/
88

9+
declare(strict_types=1);
10+
911
/**
1012
* Bootstrap tests file for Galette Helloasso plugin
1113
*
1214
* @author Johan Cwiklinski <johan@x-tnd.be>
1315
*/
1416

1517
define('GALETTE_PLUGINS_PATH', __DIR__ . '/../../');
16-
$basepath = '../../../galette/';
18+
$basepath = __DIR__ . '/../../../'; // phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable -- used from Core testBootstrap
1719

18-
include_once '../../../tests/TestsBootstrap.php';
20+
include_once __DIR__ . '/../../../../tests/TestsBootstrap.php';
1921
require_once __DIR__ . '/../_config.inc.php';

0 commit comments

Comments
 (0)