Skip to content

Commit

Permalink
minor #1426 [ci] enable skipped Symfony 7 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow authored Jan 26, 2024
1 parent 0666ff8 commit 23b5e83
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 26 deletions.
2 changes: 0 additions & 2 deletions tests/Maker/MakeEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public function getTestDetails(): \Generator
];

yield 'it_creates_a_new_class_and_api_resource' => [$this->createMakeEntityTest()
->skipOnSymfony7() // legacy: remove when API Platform supports Symfony 7
->addExtraDependencies('api')
->run(function (MakerTestRunner $runner) {
$runner->runMaker([
Expand Down Expand Up @@ -545,7 +544,6 @@ public function getTestDetails(): \Generator

yield 'it_makes_new_entity_no_to_all_extras' => [$this->createMakeEntityTestForMercure()
->addExtraDependencies('api')
->skipOnSymfony7() // legacy: remove when API Platform supports Symfony 7
// special setup done in createMakeEntityTestForMercure()
->run(function (MakerTestRunner $runner) {
$runner->runMaker([
Expand Down
4 changes: 1 addition & 3 deletions tests/Maker/MakeFixturesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ protected function getMakerClass(): string
return MakeFixtures::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_generates_fixtures' => [$this->createMakerTest()
// legacy: remove when DoctrineFixturesBundle 4.0 is installed
->skipOnSymfony7()
->run(function (MakerTestRunner $runner) {
$output = $runner->runMaker([
'FooFixtures',
Expand Down
6 changes: 2 additions & 4 deletions tests/Maker/MakeFunctionalTestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ protected function getMakerClass(): string
return MakeFunctionalTest::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_generates_test_with_panther' => [$this->createMakerTest()
/* @legacy Allows Panther >= 1.x to be installed. (PHP <8.0 support) */
->skipOnSymfony7() // legacy remove when panther supports Symfony 7
->addExtraDependencies('panther:*')
->addExtraDependencies('panther')
->run(function (MakerTestRunner $runner) {
$runner->copy(
'make-functional/MainController.php',
Expand Down
2 changes: 0 additions & 2 deletions tests/Maker/MakeRegistrationFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public function getTestDetails(): \Generator

yield 'it_generates_registration_form_with_verification' => [$this->createRegistrationFormTest()
->addExtraDependencies('symfonycasts/verify-email-bundle')
->skipOnSymfony7() // legacy: remove VerifyEmailBundle supports Symfony 7
// needed for internal functional test
->addExtraDependencies('symfony/web-profiler-bundle', 'mailer')
->run(function (MakerTestRunner $runner) {
Expand Down Expand Up @@ -138,7 +137,6 @@ public function getTestDetails(): \Generator

yield 'it_generates_registration_form_with_verification_and_translator' => [$this->createRegistrationFormTest()
->addExtraDependencies('symfonycasts/verify-email-bundle')
->skipOnSymfony7() // legacy: remove VerifyEmailBundle supports Symfony 7
// needed for internal functional test
->addExtraDependencies('symfony/web-profiler-bundle', 'mailer', 'symfony/translation')
->run(function (MakerTestRunner $runner) {
Expand Down
10 changes: 5 additions & 5 deletions tests/Maker/MakeResetPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ protected function getMakerClass(): string
public function getTestDetails(): \Generator
{
yield 'it_generates_with_normal_setup' => [$this->createMakerTest()
// @legacy - drop skipped versions when PHP 8.1 is no longer supported.
->setSkippedPhpVersions(80100, 80109)
->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$this->makeUser($runner);

Expand Down Expand Up @@ -83,8 +83,8 @@ public function getTestDetails(): \Generator
];

yield 'it_generates_with_translator_installed' => [$this->createMakerTest()
// @legacy - drop skipped versions when PHP 8.1 is no longer supported.
->setSkippedPhpVersions(80100, 80109)
->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7
->addExtraDependencies('symfony/translation')
->run(function (MakerTestRunner $runner) {
$this->makeUser($runner);
Expand All @@ -101,8 +101,8 @@ public function getTestDetails(): \Generator
];

yield 'it_generates_with_custom_config' => [$this->createMakerTest()
// @legacy - drop skipped versions when PHP 8.1 is no longer supported.
->setSkippedPhpVersions(80100, 80109)
->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$runner->deleteFile('config/packages/reset_password.yaml');
$runner->writeFile(
Expand Down Expand Up @@ -132,8 +132,8 @@ public function getTestDetails(): \Generator
];

yield 'it_amends_configuration' => [$this->createMakerTest()
// @legacy - drop skipped versions when PHP 8.1 is no longer supported.
->setSkippedPhpVersions(80100, 80109)
->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$runner->modifyYamlFile('config/packages/reset_password.yaml', function (array $config) {
$config['symfonycasts_reset_password']['lifetime'] = 9999;
Expand All @@ -160,8 +160,8 @@ public function getTestDetails(): \Generator
];

yield 'it_generates_with_custom_user' => [$this->createMakerTest()
// @legacy - drop skipped versions when PHP 8.1 is no longer supported.
->setSkippedPhpVersions(80100, 80109)
->skipOnSymfony7() // legacy: remove ResetPasswordBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$this->makeUser($runner, 'emailAddress', 'UserCustom', false);

Expand Down
3 changes: 0 additions & 3 deletions tests/Maker/MakeStimulusControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ protected function getMakerClass(): string
public function getTestDetails(): \Generator
{
yield 'it_generates_stimulus_controller_with_targets' => [$this->createMakerTest()
->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$runner->runMaker(
[
Expand Down Expand Up @@ -53,7 +52,6 @@ public function getTestDetails(): \Generator
];

yield 'it_generates_stimulus_controller_without_targets' => [$this->createMakerTest()
->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$runner->runMaker(
[
Expand All @@ -77,7 +75,6 @@ public function getTestDetails(): \Generator
];

yield 'it_generates_typescript_stimulus_controller' => [$this->createMakerTest()
->skipOnSymfony7() // legacy: remove StimulusBundle supports Symfony 7
->run(function (MakerTestRunner $runner) {
$runner->runMaker(
[
Expand Down
4 changes: 1 addition & 3 deletions tests/Maker/MakeTestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ public function getTestDetails(): \Generator
];

yield 'it_makes_PantherTestCase_type' => [$this->createMakerTest()
->skipOnSymfony7() // legacy remove when panther supports Symfony 7
/* @legacy Allows Panther >= 1.x to be installed. (PHP <8.0 support) */
->addExtraDependencies('panther:*')
->addExtraDependencies('panther')
->run(function (MakerTestRunner $runner) {
$runner->copy(
'make-test/basic_setup',
Expand Down
4 changes: 0 additions & 4 deletions tests/Maker/MakeTwigComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public function getTestDetails(): \Generator
{
yield 'it_generates_twig_component' => [$this->createMakerTest()
->addExtraDependencies('symfony/ux-twig-component', 'symfony/twig-bundle')
->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7
->run(function (MakerTestRunner $runner) {
$output = $runner->runMaker(['Alert']);

Expand All @@ -40,7 +39,6 @@ public function getTestDetails(): \Generator

yield 'it_generates_pascal_case_twig_component' => [$this->createMakerTest()
->addExtraDependencies('symfony/ux-twig-component', 'symfony/twig-bundle')
->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7
->run(function (MakerTestRunner $runner) {
$output = $runner->runMaker(['FormInput']);

Expand All @@ -59,7 +57,6 @@ public function getTestDetails(): \Generator

yield 'it_generates_live_component' => [$this->createMakerTest()
->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle')
->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7
->run(function (MakerTestRunner $runner) {
$output = $runner->runMaker(['Alert']);

Expand All @@ -78,7 +75,6 @@ public function getTestDetails(): \Generator

yield 'it_generates_pascal_case_live_component' => [$this->createMakerTest()
->addExtraDependencies('symfony/ux-live-component', 'symfony/twig-bundle')
->skipOnSymfony7() // legacy: remove when ux-twig-component supports Symfony 7
->run(function (MakerTestRunner $runner) {
$output = $runner->runMaker(['FormInput']);

Expand Down

0 comments on commit 23b5e83

Please sign in to comment.