Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
606c11b
commit 4f70b34
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
tests/end-to-end/event/_files/extension-bootstrap/phpunit-without-parameter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../../../../../phpunit.xsd" | ||
bootstrap="src/autoload.php"> | ||
<extensions> | ||
<bootstrap class="PHPUnit\TestFixture\Event\MyExtension\MyExtensionBootstrap"/> | ||
</extensions> | ||
|
||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
tests/end-to-end/event/extension-bootstrap-without-parameter.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
A PHPUnit extension can subscribe to events | ||
--FILE-- | ||
<?php declare(strict_types=1); | ||
$_SERVER['argv'][] = '--do-not-cache-result'; | ||
$_SERVER['argv'][] = '--no-output'; | ||
$_SERVER['argv'][] = '--configuration'; | ||
$_SERVER['argv'][] = __DIR__ . '/_files/extension-bootstrap/phpunit-without-parameter.xml'; | ||
|
||
require __DIR__ . '/../../bootstrap.php'; | ||
|
||
PHPUnit\TextUI\Application::main(); | ||
--EXPECTF-- | ||
PHPUnit\TestFixture\Event\MyExtension\MyExecutionFinishedSubscriber::notify | ||
the-default-message |