-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added composer diff CI. Imported DataProvider attribute.
- Loading branch information
1 parent
6962d27
commit 8eff2af
Showing
55 changed files
with
274 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Composer Diff | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'composer.lock' | ||
pull_request: | ||
paths: | ||
- 'composer.lock' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate composer diff | ||
id: composer_diff | ||
uses: IonBazan/composer-diff-action@v1 | ||
|
||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
if: ${{ steps.composer_diff.outputs.composer_diff_exit_code != 0 }} | ||
with: | ||
header: composer-diff | ||
message: | | ||
<details> | ||
<summary>Composer package changes</summary> | ||
${{ steps.composer_diff.outputs.composer_diff }} | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
use App\Controller\AjaxUserController; | ||
use App\Tests\Web\AbstractAuthenticateWebTestCase; | ||
use PHPUnit\Framework\Attributes\CoversClass; | ||
use PHPUnit\Framework\Attributes\DataProvider; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Contracts\Translation\TranslatorInterface; | ||
|
@@ -53,7 +54,7 @@ public static function getUsers(): \Iterator | |
yield ['username.not_found', '[email protected]']; | ||
} | ||
|
||
#[\PHPUnit\Framework\Attributes\DataProvider('getEmails')] | ||
#[DataProvider('getEmails')] | ||
public function testCheckEmail(string|bool $expected, ?string $email = null, ?int $id = null): void | ||
{ | ||
$this->loginUsername('ROLE_SUPER_ADMIN'); | ||
|
@@ -63,7 +64,7 @@ public function testCheckEmail(string|bool $expected, ?string $email = null, ?in | |
$this->validateResponse($response, $expected); | ||
} | ||
|
||
#[\PHPUnit\Framework\Attributes\DataProvider('getNames')] | ||
#[DataProvider('getNames')] | ||
public function testCheckName(string|bool $expected, ?string $username = null, ?int $id = null): void | ||
{ | ||
$this->loginUsername('ROLE_SUPER_ADMIN'); | ||
|
@@ -73,7 +74,7 @@ public function testCheckName(string|bool $expected, ?string $username = null, ? | |
$this->validateResponse($response, $expected); | ||
} | ||
|
||
#[\PHPUnit\Framework\Attributes\DataProvider('getUsers')] | ||
#[DataProvider('getUsers')] | ||
public function testCheckUser(string|bool $expected, ?string $user = null): void | ||
{ | ||
$parameters = ['user' => $user]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
|
||
use App\Form\DataTransformer\AddressTransformer; | ||
use PHPUnit\Framework\Attributes\CoversClass; | ||
use PHPUnit\Framework\Attributes\DataProvider; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Form\Exception\TransformationFailedException; | ||
use Symfony\Component\Mime\Address; | ||
|
@@ -52,7 +53,7 @@ public static function getTransformValues(): \Generator | |
yield [new Address('[email protected]', 'username'), \htmlentities('username <[email protected]>')]; | ||
} | ||
|
||
#[\PHPUnit\Framework\Attributes\DataProvider('getReverseTransformValues')] | ||
#[DataProvider('getReverseTransformValues')] | ||
public function testReverseTransform(mixed $value, mixed $expected, bool $exception = false): void | ||
{ | ||
if ($exception) { | ||
|
@@ -66,7 +67,7 @@ public function testReverseTransform(mixed $value, mixed $expected, bool $except | |
} | ||
} | ||
|
||
#[\PHPUnit\Framework\Attributes\DataProvider('getTransformValues')] | ||
#[DataProvider('getTransformValues')] | ||
public function testTransform(mixed $value, mixed $expected, bool $exception = false): void | ||
{ | ||
if ($exception) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.