Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Testsuite failing on PHP 7.3/7.4 #644

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

Closed
ckrack opened this issue Jul 2, 2020 · 2 comments
Closed

Testsuite failing on PHP 7.3/7.4 #644

ckrack opened this issue Jul 2, 2020 · 2 comments

Comments

@ckrack
Copy link
Contributor

ckrack commented Jul 2, 2020

I'm having problems with the testsuite and it seems that it fails for the latest changes, too.
Actually there seems to be several problems.

I've encountered the "Aborted." errors in my tests for make:dto and was able to avoid them when using setArgumentsString().

This fails:

        yield 'dto_no_mutator' => [MakerTestDetails::createTest(
            $this->getMakerInstance(MakeDto::class),
            [
                'TaskData',
                'Task',
                // Mutable public (for simplicity)
                2,
                // Add no mutator to Entity
                'no',
            ])
            ->addExtraDependencies('doctrine')
            ->addExtraDependencies('validator')
            ->setFixtureFilesPath(__DIR__.'/../fixtures/MakeDtoNoMutator')
            ->assert(function (string $output) {
                $this->assertContains('created: src/Dto/TaskData.php', $output);
                $this->assertContains('updated: src/Dto/TaskData.php', $output);
            }),
        ];

while this succeeds:

        yield 'dto_no_mutator' => [MakerTestDetails::createTest(
            $this->getMakerInstance(MakeDto::class),
            [
-               'TaskData',
-               'Task',
                // Mutable public (for simplicity)
                2,
                // Add no mutator to Entity
                'no',
            ])
+           ->setArgumentsString('TaskData Task')
            ->addExtraDependencies('doctrine')
            ->addExtraDependencies('validator')
            ->setFixtureFilesPath(__DIR__.'/../fixtures/MakeDtoNoMutator')
            ->assert(function (string $output) {
                $this->assertContains('created: src/Dto/TaskData.php', $output);
                $this->assertContains('updated: src/Dto/TaskData.php', $output);
            }),
        ];

I think this is related to command arguments being added outside of configureCommand (#626), but could not completely track it down.
Maybe it's also related to #633 and #629

I'm having another bug in the test above, the 'no' input for the ChoiceQuestion always comes out as a boolean.
It's passed correctly in MakerTestEnvironment::runMaker().

@jrushlow
Copy link
Collaborator

Tests are now running on Github Actions (PR #701) instead of Travis.

@jrushlow
Copy link
Collaborator

I'm going to close this issue for now. I've run the test suite locally and on CI a few times - all tests (with the exception of PHP8) are passing. Based on the referenced Travis log, it appears that this was a database connection issue.

If you experience this problems again, please feel free to reopen this issue with any relevant details. Thanks @ckrack for bringing this to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants