Skip to content
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

Add support for PHPUnit's @depends #103

Merged
merged 6 commits into from
Jun 21, 2020
Merged

Add support for PHPUnit's @depends #103

merged 6 commits into from
Jun 21, 2020

Conversation

nuernbergerA
Copy link
Contributor

@nuernbergerA nuernbergerA commented Jun 19, 2020

This PR adds support for Test Dependencies.

Usage

test('first', function () {
    assertTrue(true);

    return 'first';
});

test('second', function () {
    assertTrue(true);

    return 'second';
});

test('depends', function () {
    assertEquals(
        ['first', 'second'],
        func_get_args()
    );
})->depends('first', 'second');

Feel free to change this PR or request changes.

Cheers Adrian

@nunomaduro
Copy link
Member

Going to review this, meanwhile can you also update the docs on this. @alexmartinfr will review the grammar.

Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. Let's adjust some small details before merge.

src/Concerns/TestCase.php Outdated Show resolved Hide resolved
src/Concerns/TestCase.php Show resolved Hide resolved
src/Concerns/TestCase.php Show resolved Hide resolved
src/Factories/TestCaseFactory.php Show resolved Hide resolved
src/PendingObjects/TestCall.php Outdated Show resolved Hide resolved
src/PendingObjects/TestCall.php Outdated Show resolved Hide resolved
src/Support/Mixed.php Outdated Show resolved Hide resolved
src/Support/ExceptionTrace.php Outdated Show resolved Hide resolved
@nunomaduro
Copy link
Member

Let me know when you think this is ready.

Copy link
Member

@nunomaduro nunomaduro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this during the weekend. Good job! Can you also work on the docs?

@nuernbergerA
Copy link
Contributor Author

nuernbergerA commented Jun 19, 2020

Summon @mathiasonea to write docs

@alexmartinfr
Copy link
Collaborator

alexmartinfr commented Jun 19, 2020

I'll be free to review the draft tomorrow afternoon and Sunday if needed 👌

(If you can't, you can provide a stub with the structure / main informations and I can work on that).

@nunomaduro nunomaduro merged commit 1bf8022 into pestphp:master Jun 21, 2020
@nuernbergerA nuernbergerA deleted the feature/depends branch July 3, 2020 14:37
@ariaieboy
Copy link

why there is no document about this ?

@mathiasonea
Copy link

why there is no document about this ?

@ariaieboy you are more than welcome to contribute this part to the docs 👍🏼

@ariaieboy
Copy link

i dont know where should this one go in the document should we add this to writing test section ?

@owenvoke
Copy link
Member

owenvoke commented May 9, 2022

It can probably have it's own section, similar to the groups() functionality. 👍🏻 We can always change the location if it doesn't seem right.

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

Successfully merging this pull request may close these issues.

None yet

7 participants