Skip to content

Allow additional arguments to be passed to PHPUnit.#62

Open
longwave wants to merge 1 commit intodrupal-canvas:mainfrom
longwave:phpunit-arguments
Open

Allow additional arguments to be passed to PHPUnit.#62
longwave wants to merge 1 commit intodrupal-canvas:mainfrom
longwave:phpunit-arguments

Conversation

@longwave
Copy link
Copy Markdown
Contributor

It is useful to be able to pass additional arguments to phpunit to run individual tests.

Before:

$ ddev xb-phpunit tests/src/Kernel/Plugin/Field/FieldType/ComponentTreeItemResolvedTest.php --filter testResolvedInvalidatedOnInputChange
PHPUnit 11.5.55 by Sebastian Bergmann and contributors.

Test file "modules/contrib/canvas/tests/src/Kernel/Plugin/Field/FieldType/ComponentTreeItemResolvedTest.php --filter testResolvedInvalidatedOnInputChange" not found

After:

$ ddev xb-phpunit tests/src/Kernel/Plugin/Field/FieldType/ComponentTreeItemResolvedTest.php --filter testResolvedInvalidatedOnInputChange
PHPUnit 11.5.55 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.17
Configuration: /var/www/html/web/core/phpunit.xml.dist

F                                                                   1 / 1 (100%)

Time: 00:06.871, Memory: 25.30 MB

There was 1 failure:

1) Drupal\Tests\canvas\Kernel\Plugin\Field\FieldType\ComponentTreeItemResolvedTest::testResolvedInvalidatedOnInputChange
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'Updated heading'
+'Original heading'

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant