Mailing List Archive

PhpStorm + PHPUnit Integration Tests
Hello!

Did someone successfully configured PhpStorm to run integration tests in the GUI?

To make integration tests work,

tests/phpunit/phpunit.php

has to be used. But that seems not possible to integrate with PhpStorm.

Many regards,
Daniel Riedm?ller
Re: PhpStorm + PHPUnit Integration Tests [ In reply to ]
Yes. See https://www.mediawiki.org/wiki/JetBrains_IDEs#Running_unit_tests.

On Wed, 29 Nov 2023 at 20:02, Daniel Riedmueller via Wikitech-l <
wikitech-l@lists.wikimedia.org> wrote:

> Hello!
>
> Did someone successfully configured PhpStorm to run integration tests in
> the GUI?
>
> To make integration tests work,
>
> tests/phpunit/phpunit.php
>
> has to be used. But that seems not possible to integrate with PhpStorm.
>
> Many regards,
> Daniel Riedmüller
>
>
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
Re: PhpStorm + PHPUnit Integration Tests [ In reply to ]
For me this has mostly worked (except for tests that access the service
container in data providers, which is discouraged anyway
<https://phabricator.wikimedia.org/T332865>) for a few months now –
probably since Daimona’s work on phpunit:entrypoint
<https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/QT7G4CRKZG4VEUR2SXIMYGHDSKIFUS5D/>.
(I didn’t have to do any special IDE configuration, it Just Worked™ for
me.) Are you using the master branch or some released version of MediaWiki?

(I’m using IntelliJ IDEA Ultimate, but I assume PHPStorm should work very
similarly.)


Am Mi., 29. Nov. 2023 um 15:32 Uhr schrieb Daniel Riedmueller via
Wikitech-l <wikitech-l@lists.wikimedia.org>:

> Hello!
>
> Did someone successfully configured PhpStorm to run integration tests in
> the GUI?
>
> To make integration tests work,
>
> tests/phpunit/phpunit.php
>
> has to be used. But that seems not possible to integrate with PhpStorm.
>
> Many regards,
> Daniel Riedmüller
>
>
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>


--
Lucas Werkmeister (he/er)
Software Engineer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30-577 11 62-0
https://wikimedia.de

Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland — Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Charlottenburg, VR 23855 B.
Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin,
Steuernummer 27/029/42207.
Re: PhpStorm + PHPUnit Integration Tests [ In reply to ]
Hello!
Thanks for your quick answer!

I just tried it again with master banch of mediawiki, but i have the same issue.
Unit tests working out of the box, but integration with access to services, database, etc... are not working.
For example if i write a ApiTestCase test.
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Re: PhpStorm + PHPUnit Integration Tests [ In reply to ]
You can specify vendor/bin/phpunit as the path to PHPUnit in PhpStorm. Can
you post some screenshots of your configuration and errors?

Kosta

On 30. Nov 2023 at 13:40:24, daniel.riedmueller--- via Wikitech-l <
wikitech-l@lists.wikimedia.org> wrote:

> Hello!
> Thanks for your quick answer!
>
> I just tried it again with master banch of mediawiki, but i have the same
> issue.
> Unit tests working out of the box, but integration with access to
> services, database, etc... are not working.
> For example if i write a ApiTestCase test.
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>