Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
71890ea
Working draft for Event subsystem
theseer Oct 5, 2019
1bab55c
Fix: Do not use PHP 7.4 features yet
localheinz Oct 5, 2019
bdf1191
Fix: Run php-cs-fixer
localheinz Oct 5, 2019
833019d
Enhancement: Add test for UnsupportedEvent
localheinz Oct 5, 2019
0298855
Enhancement: Implement Exception interface
localheinz Oct 5, 2019
e8f2b15
Enhancement: Rename method
localheinz Oct 5, 2019
bd4427c
Enhancement: Rename method
localheinz Oct 5, 2019
92ca267
Enhancement: Extract NamedType
localheinz Oct 5, 2019
97e2a7c
Enhancement: Add test for Types
localheinz Oct 5, 2019
f055d5a
Enhancement: Add test for Subscribers
localheinz Oct 5, 2019
1ffb26c
Fix: Return EmptyIterator when no subscribers have been added for type
localheinz Oct 5, 2019
4c1cf8d
Enhancement: Mark Subscribers as final
localheinz Oct 5, 2019
48b2e8f
Enhancement: Allow adding multiple subscribers at once
localheinz Oct 5, 2019
6d58186
Enhancement: Add test for Dispatcher
localheinz Oct 5, 2019
90e2b57
Enhancement: Allow registering multiple subscribers at once
localheinz Oct 5, 2019
c808d4b
Enhancement: Inline Subscribers
localheinz Oct 5, 2019
b28eac4
Enhancement: Rename method
localheinz Oct 5, 2019
0745d3d
Enhancement: Mark class as final
localheinz Oct 6, 2019
e1955bc
Enhancement: Move NamedType into src
localheinz Oct 6, 2019
36e296f
Enhancement: Implement GenericEvent
localheinz Oct 6, 2019
a8ce211
Enhancement: Instantiate Dispatcher and pass it around
localheinz Oct 6, 2019
55115d2
Enhancement: Dispatch test-suite-started and -ended events
localheinz Oct 6, 2019
abdf2f1
Enhancement: Dispatch test-started and -ended events
localheinz Oct 6, 2019
97be92f
Enhancement: Compose subscriber class name into exception message
localheinz Oct 6, 2019
dc474c5
Enhancement: Rename method
localheinz Oct 6, 2019
5cdf42b
Fix: Require at least one type
localheinz Oct 6, 2019
4e30b99
Fix: Exception should be an InvalidArgumentException
localheinz Oct 6, 2019
6a4c966
Enhancement: Dispatch concrete events
localheinz Oct 6, 2019
41de596
Fix: Rename types
localheinz Oct 6, 2019
59411d6
Fix: Do not import every class
localheinz Oct 6, 2019
3d76675
Introduce SubType for Events to handle logical groupings
theseer Oct 6, 2019
f7569c6
Enhancement: No need to register multiple subscribers at once
localheinz Oct 6, 2019
b2cc768
Fix: Run php-cs-fixer
localheinz Oct 6, 2019
b2acb26
Fix: Do not import every class
localheinz Oct 6, 2019
1b92335
Use concrete event types
theseer Oct 6, 2019
09e9c1f
Enhancement: Compose Test and TestSuite into events
localheinz Oct 6, 2019
4d9040b
Fix: Mark classes as final
localheinz Oct 6, 2019
a0c246f
Fix: Use concrete event types in tests
localheinz Oct 6, 2019
250d78f
Enhancement: Add tests for event types
localheinz Oct 6, 2019
4314892
Enhancement: Extract AbstractTypeTestCase
localheinz Oct 6, 2019
5deb1f6
Enhancement: Dispatch BeforeRun and AfterRun events
localheinz Oct 6, 2019
a8b42b2
Enhancement: Compose result into test
localheinz Oct 6, 2019
a7293ba
Fix: Move tests into appropriate namespace
localheinz Oct 7, 2019
42002a2
Fix: Remove duplicated tests
localheinz Oct 7, 2019
8fe47ca
Enhancement: Rename type
localheinz Oct 7, 2019
7985be1
Enhancement: Split tests
localheinz Oct 8, 2019
27973a9
Enhancement: Compose Run into BeforeRun and AfterRun
localheinz Oct 8, 2019
2e3eb2b
Enhancement: Compose Result into AfterTest
localheinz Oct 8, 2019
286e9f8
Enhancement: Dispatch BeforeTest and AfterTest event
localheinz Oct 8, 2019
a781da3
Fix: Covers annotations
localheinz Oct 8, 2019
165acb8
Enhancement: Compose name into TestSuite
localheinz Oct 8, 2019
1722589
Fix: Rename result
localheinz Oct 8, 2019
48c21cb
Enhancement: Dispatch BeforeFirstTest and AfterLastTest events
localheinz Oct 8, 2019
a641330
Enhancement: Compose number of tests into TestSuite event
localheinz Oct 8, 2019
d1772b7
Enhancement: Compose number of assertions into Success object
localheinz Oct 8, 2019
220b1e2
Enhancement: Dispatch BeforeTest and AfterTest event when test is Tes…
localheinz Oct 8, 2019
ffd8ff9
Enhancement: Replace types with map of subscriber interface name to e…
localheinz Oct 10, 2019
47efc3a
Enhancement: Dispatch BeforeExecution event
localheinz Oct 12, 2019
7ddc1e2
Enhancement: Let VersionReporter report version
localheinz Oct 12, 2019
ec0698b
Fix: Inject dispatcher
localheinz Oct 12, 2019
e1e4460
Tweak: Invert dispatcher registration logic
theseer Oct 12, 2019
6da6854
Tweak: Simplify
theseer Oct 12, 2019
3b53ce6
Fix: VersionReporter should implement BeforeExecutionSubscriber
localheinz Oct 13, 2019
c061b7a
Fix: Remove VersionReporter
localheinz Oct 17, 2019
dadb4cd
Fix: Pass dispatcher to methods that need it
localheinz Oct 17, 2019
ef78e24
Fix: Use anonymous class as test double
localheinz Oct 17, 2019
00322c7
Extract TypeMap, add Facade and 1st draft for Emitter
theseer Oct 17, 2019
49eeb60
Fix: Run 'make cs'
localheinz Oct 17, 2019
9dbe35f
Enhancement: Mark Dispatcher as internal
localheinz Oct 17, 2019
b94e312
Fix: Remove unused fixtures
localheinz Oct 17, 2019
00a4ca2
Fix: Failing tests
localheinz Oct 17, 2019
31dae65
Fix: Remove events for now
localheinz Oct 17, 2019
f62fdc6
Fix: Do not pass in emitter for now
localheinz Oct 18, 2019
518c61c
Enhancement: Add events
localheinz Oct 28, 2019
450476b
Fix: Class name
localheinz Oct 28, 2019
e404e99
Enhancement: Add event subscriber interfaces
localheinz Nov 14, 2019
84aa842
Enhancement: Use proper Exceptions instead of \RuntimeException
theseer Nov 14, 2019
c6b9227
Disable Type inspection
theseer Nov 14, 2019
c95648a
Fix formatting
theseer Nov 14, 2019
f671a8e
Make psalm happy
theseer Nov 14, 2019
f728cfe
Enhancement: Add methods allowing emitter to create and dispatch events
localheinz Nov 14, 2019
ae9a2c3
WiP: Add Telemetric support
theseer Nov 14, 2019
1144d55
Add stubs
theseer Nov 14, 2019
550fab2
Fix: Run 'make cs'
localheinz Nov 14, 2019
ac953db
Enhancement: Implement SystemClock
localheinz Nov 14, 2019
7148eaf
Enhancement: Implement MemoryUsage as a value object
localheinz Nov 14, 2019
8a59a1a
Enhancement: Implement SystemMemoryMeter
localheinz Nov 14, 2019
2ac2bad
Enhancement: Use named constructor
localheinz Nov 14, 2019
190bae5
Fix: Do not use yoda condition
localheinz Nov 14, 2019
cd05633
Enhancement: Allow negative values to account for diffs
localheinz Nov 14, 2019
ad001e7
Enhancement: Implement Snapshot as a value object
localheinz Nov 14, 2019
d0f16a6
Enhancement: Add tests for SysInfo
localheinz Nov 14, 2019
5902dd8
Enhancement: Add method for computing difference in memory usage
localheinz Nov 14, 2019
4cbacdb
Enhancement: Rename namespace
localheinz Nov 14, 2019
83f83cd
Enhancement: Rename methods
localheinz Nov 14, 2019
6843d19
Enhancement: Rename class
localheinz Nov 14, 2019
265170a
Add Telemetry Info to events
theseer Nov 14, 2019
a99a1ec
Drop 'get' prefix
theseer Nov 14, 2019
d868029
Fix wrong case
theseer Nov 14, 2019
a2daaf2
Update Facade
theseer Nov 14, 2019
51a1288
Fix formatting
theseer Nov 14, 2019
4dca213
Enhancement: Compose Telemetry\Info into events
localheinz Nov 14, 2019
a56c9c9
Activate Event Subsystem
theseer Nov 14, 2019
ad12dde
Move setting EventEmitter into constructor
theseer Nov 14, 2019
c9ed1f0
Fix: Run 'make cs'
localheinz Nov 14, 2019
c474498
Enhancement: Extract interface
localheinz Nov 14, 2019
ef38b73
Enhancement: Implement NullEmitter
localheinz Nov 14, 2019
b025538
Enhancement: Emit events
localheinz Nov 14, 2019
77bbeef
Fix: Typo
localheinz Dec 27, 2019
ff46ff4
Fix: Test
localheinz Dec 27, 2019
50e652f
Fix: Do not invoke instance method statically
localheinz Dec 27, 2019
155830c
Enhancement: Emit TestSuite\Sorted event
localheinz Dec 27, 2019
0ec698f
Enhancement: Emit TestSuite\RunStarted and TestSuite\RunFinished events
localheinz Dec 27, 2019
dcd5ade
Enhancement: Use registry with singleton for now
localheinz Dec 27, 2019
2b08e75
Enhancement: Emit TestDouble\ProphecyCreated event
localheinz Dec 27, 2019
243119f
Enhancement: Emit TestDouble\MockCreated event
localheinz Dec 27, 2019
fabc329
Enhancement: Emit TestDouble\PartialMockCreated event
localheinz Dec 27, 2019
9ff219e
Enhancement: Emit TestDouble\TestProxyCreated event
localheinz Dec 27, 2019
940c4e3
Enhancement: Emit TestDouble\MockForTraitCreated event
localheinz Dec 27, 2019
c2d8322
Enhancement: Emit Assertion\Made event
localheinz Dec 27, 2019
a3e984b
Enhancement: Emit Comparator\Registered event
localheinz Dec 27, 2019
034a812
Enhancement: Emit GlobalState\Restored event
localheinz Dec 27, 2019
864ffb3
Enhancement: Emit GlobalState\Modified event
localheinz Dec 27, 2019
61f6205
Enhancement: Emit GlobalState\Captured event
localheinz Dec 27, 2019
7fdda82
Enhancement: Emit TestSuite\BeforeClassFinished event
localheinz Dec 27, 2019
343de9c
Enhancement: Emit TestSuite\AfterClassFinished event
localheinz Dec 27, 2019
f3496d0
Fix: Revert unrelated changes
localheinz Dec 27, 2019
6e490d0
Enhancement: Emit Test\SetUpFinished event
localheinz Dec 27, 2019
f0be5d7
Fix: Disable phpdoc_to_comment fixer
localheinz Mar 9, 2020
203069f
Fix: Keep events sorted by name
localheinz Mar 9, 2020
c6d2538
Fix: Remove unneeded events
localheinz Mar 9, 2020
a17b69d
Enhancement: Aggregate $argv and $exit in Application\Started event
localheinz Mar 9, 2020
116b23b
Fix: No need for logicalAnd()
localheinz Mar 9, 2020
020caf5
Enhancement: Emit Arguments\Parsed event
localheinz Mar 9, 2020
35c26e9
Fix: Emit Application\Configured event a bit earlier
localheinz Mar 9, 2020
54b1d53
Fix: Import parent namespace only
localheinz Mar 9, 2020
8f1299a
Enhancement: Pass in $suite when emitting Application\Configured event
localheinz Mar 9, 2020
e551b76
Enhancement: Pass in $resolvedFilename when emitting Bootstrap\Finish…
localheinz Mar 9, 2020
57014af
Enhancement: Emit Bootstrap\Started event
localheinz Mar 9, 2020
cbabae9
Enhancement: Pass in $arguments and $configuration when emitting Appl…
localheinz Mar 9, 2020
80085f4
Fix: Remove Arguments\Parsed
localheinz Mar 9, 2020
9e0f788
Enhancement: Pass in $manifest when emitting Extension\Loaded event
localheinz Mar 9, 2020
1208720
Enhancement: Emit Configuration\Loaded event
localheinz Mar 9, 2020
7cd8211
Fix: Do not emit TestSuite\Sorted event
localheinz Mar 9, 2020
3ccdbb9
Enhancement: Emit Application\Configured event
localheinz Mar 9, 2020
90617b1
Fix: Emit Application\Configured event a bit later
localheinz Mar 9, 2020
6baf140
Fix: Do not emit Test\RunStarted event
localheinz Mar 9, 2020
2ddc0cf
Enhancement: Pass in $suite when emitting Application\Configured event
localheinz Mar 9, 2020
f0a6800
Fix: Do not emit Test\RunFinished event
localheinz Mar 9, 2020
dafb9a0
Enhancement: Emit TestSuite\RunStarted event
localheinz Mar 9, 2020
e2ec87e
Enhancement: Emit TestSuite\RunFinished event
localheinz Mar 9, 2020
475e3e7
Revert "Fix: Remove unneeded events"
localheinz Mar 9, 2020
87d5a40
Enhancement: Emit TestSuite\RunFailed event
localheinz Mar 9, 2020
76979e9
Fix: Emit TestSuite\RunFailed event
localheinz Mar 9, 2020
2bd9888
Enhancement: Emit TestCase\RunSkippedWithWarning event
localheinz Mar 9, 2020
644656f
Emit RunSkipped events
theseer Mar 9, 2020
b556a6a
Fix: Run php-cs-fixer
localheinz Mar 9, 2020
4445270
Enhancement: Emit Test\RunStarted event
localheinz Mar 9, 2020
094c710
Fix: Wrapping
localheinz Mar 10, 2020
408bcd6
Enhancement: Implement TestCase\RunSkippedWithError
localheinz Mar 10, 2020
1b70e19
Fix: Wrapping
localheinz Mar 10, 2020
830cae1
Fix: Order
localheinz Mar 10, 2020
835012e
Enhancement: Implement TestCase\RunSkippedWithWarning
localheinz Mar 10, 2020
8a5ddbf
Enhancement: Pass in $testSuite when emitting TestSuite\RunStarted event
localheinz Mar 10, 2020
3dfafb5
Enhancement: Pass in $testSuite when emitting TestSuite\RunFinished e…
localheinz Mar 10, 2020
1787041
Fix: Consistently use $testSuite instead of $suite
localheinz Mar 10, 2020
a7087de
Enhancement: Implement Configuration\Loaded event
localheinz Mar 10, 2020
8ddcdba
Fix: Emit Test\RunConfigured instead of Test\RunStarted event
localheinz Mar 10, 2020
06f3caf
Fix: Conditionally emit Test\RunConfigured event with timeout
localheinz Mar 10, 2020
1623468
Enhancement: Introduce explaining variable
localheinz Mar 10, 2020
a4476be
Add event emitter calls to TestResult::addFailure
theseer Mar 10, 2020
da26cef
Fix: Run php-cs-fixer
localheinz Mar 10, 2020
21a7b40
Fix: Add stubs
localheinz Mar 10, 2020
ca8d60b
Enhancement: Emit Test\RunWithOutput event
localheinz Mar 10, 2020
8071feb
Fix: Remove TestCase\RunSkippedWithError
localheinz Mar 10, 2020
0d63694
Fix: Remove TestCase\RunSkippedWithWarning
localheinz Mar 10, 2020
52b258e
Add event emitter calls to TestResult::addWarning and TestResult::add…
theseer Mar 10, 2020
4cfe7f7
Fix: Rename Test\RunSkippedWithWarning to Test\RunWarning
localheinz Mar 10, 2020
3a2442d
Fix: Pass in useful data when emitting Test\RunWarning event
localheinz Mar 10, 2020
6237073
Fix: Pass in useful data when emitting Test\RunRisky event
localheinz Mar 10, 2020
16efac1
Enhancement: Implement Test\RunIncomplete
localheinz Mar 10, 2020
be600ad
Fix: Pass in useful data when emitting Test\RunErrored event
localheinz Mar 10, 2020
aff027f
Fix: Wrapping
localheinz Mar 10, 2020
df7de53
Enhancement: Implement Test\RunSkipped
localheinz Mar 10, 2020
16b571f
Add time to event emitter call
theseer Mar 10, 2020
87a9952
Enhancement: Aggregate time in events
localheinz Mar 10, 2020
4f8aaf3
Emit runFinished for test
theseer Mar 10, 2020
c52e076
Add more flags to configured event emit
theseer Mar 10, 2020
68f97c5
Resort parameters
theseer Mar 10, 2020
a27f235
Add coverage data to finished event
theseer Mar 10, 2020
7a0e089
Fix: Pass in useful data when emitting Test\RunConfigured event
localheinz Mar 10, 2020
d40a84d
Fix: Run php-cs-fixer
localheinz Mar 10, 2020
35ef80a
Fix: Remove TestSuite\Loaded event
localheinz Mar 10, 2020
ebff7ff
Fix: Remove TestSuite\Sorted event
localheinz Mar 10, 2020
50811d9
Fix: Remove Test\RunSkippedIncomplete event
localheinz Mar 10, 2020
7882eb8
Fix: Signature
localheinz Mar 10, 2020
47f9049
Fix: Remove Test\RunPassed event
localheinz Mar 10, 2020
fa0d2c5
Fix: Annotation
localheinz Mar 10, 2020
8bcfea2
Fix: Move events into Test namespace
localheinz Mar 10, 2020
e2287a2
Fix: Remove TestCase\SetUpFinished
localheinz Mar 10, 2020
0ac9d9e
Fix: Annotation
localheinz Mar 10, 2020
35883c4
Fix: Move events into Test namespace
localheinz Mar 10, 2020
6d68bdb
Fix: Remove Test\AfterClassFinished
localheinz Mar 10, 2020
da9d542
Fix: Remove Test\BeforeClassFinished
localheinz Mar 10, 2020
2e95c61
Fix: Move events into Test namespace
localheinz Mar 10, 2020
6864639
Adjust formatting
theseer Mar 10, 2020
f8fe338
Cleanup SetUp/TearDown event triggering
theseer Mar 10, 2020
af02604
Fix: Remove obsolete tests
localheinz Mar 10, 2020
076bb5c
Enhancement: Emit Test\TearDownFinished event
localheinz Mar 10, 2020
9963e9c
Fix: Emit TestSuite\TearDownAfterClassFinished event
localheinz Mar 10, 2020
18e39bc
Fix: Emit TestSuite\SetUpBeforeClassFinished event
localheinz Mar 10, 2020
46fd3a6
Fix: Remove TestSuite\Configured event
localheinz Mar 10, 2020
234a09a
Fix: Remove unused events
localheinz Mar 10, 2020
8b88efc
Fix: Pass in useful data when emitting Test\RunFailed event
localheinz Mar 10, 2020
1072a02
Rename Event\Registry to Event\Facade - again
theseer Mar 10, 2020
3de6036
Fix: Pass in useful data when emitting Test\RunFinished event
localheinz Mar 10, 2020
168708c
Enhancement: Emit Bootstrap\Started event
localheinz Mar 11, 2020
f0e3450
Fix: Pass in useful data when emitting Bootstrap\Finished event
localheinz Mar 11, 2020
fa64d19
Fix: Pass in useful data when emitting Extension\Loaded event
localheinz Mar 11, 2020
d5d0c24
Fix: Pass in useful data when emitting Application\Configured event
localheinz Mar 11, 2020
975537f
Fix: Pass in useful data when emitting TestDouble\MockCreated event
localheinz Mar 11, 2020
38adf1f
Fix: Pass in useful data when emitting Assertion\Made event
localheinz Mar 11, 2020
e724bd7
Fix: Pass in useful data when emitting TestDouble\PartialMockCreated …
localheinz Mar 11, 2020
3e7e63f
Fix: Pass in useful data when emitting TestDouble\TestProxyCreated event
localheinz Mar 11, 2020
e19939f
Add CLI option to register subscribers
Jean85 Mar 11, 2020
7abf500
Fix test
Jean85 Mar 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ return PhpCsFixer\Config::create()
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_to_comment' => true,
'phpdoc_to_comment' => false, // https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4649
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => ['groups' => ['simple', 'meta']],
Expand Down
54 changes: 54 additions & 0 deletions src/Event/Application/Configured.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Application;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;
use PHPUnit\Framework;

final class Configured implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

/**
* @var Framework\Test
*/
private $test;

/**
* @var array
*/
private $arguments;

public function __construct(Telemetry\Info $telemetryInfo, Framework\Test $test, array $arguments)
{
$this->telemetryInfo = $telemetryInfo;
$this->test = $test;
$this->arguments = $arguments;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}

public function test(): Framework\Test
{
return $this->test;
}

public function arguments(): array
{
return $this->arguments;
}
}
17 changes: 17 additions & 0 deletions src/Event/Application/ConfiguredSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Application;

use PHPUnit\Event\Subscriber;

interface ConfiguredSubscriber extends Subscriber
{
public function notify(Configured $event): void;
}
53 changes: 53 additions & 0 deletions src/Event/Application/Started.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Application;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;

final class Started implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

/**
* @var array
*/
private $argv;

/**
* @var bool
*/
private $exit;

public function __construct(Telemetry\Info $telemetryInfo, array $argv, bool $exit)
{
$this->telemetryInfo = $telemetryInfo;
$this->argv = $argv;
$this->exit = $exit;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}

public function argv(): array
{
return $this->argv;
}

public function exit(): bool
{
return $this->exit;
}
}
17 changes: 17 additions & 0 deletions src/Event/Application/StartedSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Application;

use PHPUnit\Event\Subscriber;

interface StartedSubscriber extends Subscriber
{
public function notify(Started $event): void;
}
42 changes: 42 additions & 0 deletions src/Event/Assertion/Made.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Assertion;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;

final class Made implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

/**
* @var bool
*/
private $failed;

public function __construct(Telemetry\Info $telemetryInfo, bool $failed)
{
$this->telemetryInfo = $telemetryInfo;
$this->failed = $failed;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}

public function failed(): bool
{
return $this->failed;
}
}
17 changes: 17 additions & 0 deletions src/Event/Assertion/MadeSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Assertion;

use PHPUnit\Event\Subscriber;

interface MadeSubscriber extends Subscriber
{
public function notify(Made $event): void;
}
53 changes: 53 additions & 0 deletions src/Event/Bootstrap/Finished.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Bootstrap;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;

final class Finished implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

/**
* @var string
*/
private $filename;

/**
* @var string
*/
private $resolvedFilename;

public function __construct(Telemetry\Info $telemetryInfo, string $filename, string $resolvedFilename)
{
$this->telemetryInfo = $telemetryInfo;
$this->filename = $filename;
$this->resolvedFilename = $resolvedFilename;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}

public function filename(): string
{
return $this->filename;
}

public function resolvedFilename(): string
{
return $this->resolvedFilename;
}
}
17 changes: 17 additions & 0 deletions src/Event/Bootstrap/FinishedSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Bootstrap;

use PHPUnit\Event\Subscriber;

interface FinishedSubscriber extends Subscriber
{
public function notify(Finished $event): void;
}
42 changes: 42 additions & 0 deletions src/Event/Bootstrap/Started.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Bootstrap;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;

final class Started implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

/**
* @var string
*/
private $filename;

public function __construct(Telemetry\Info $telemetryInfo, string $filename)
{
$this->telemetryInfo = $telemetryInfo;
$this->filename = $filename;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}

public function filename(): string
{
return $this->filename;
}
}
17 changes: 17 additions & 0 deletions src/Event/Bootstrap/StartedSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Bootstrap;

use PHPUnit\Event\Subscriber;

interface StartedSubscriber extends Subscriber
{
public function notify(Started $event): void;
}
31 changes: 31 additions & 0 deletions src/Event/Comparator/Registered.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Comparator;

use PHPUnit\Event\Event;
use PHPUnit\Event\Telemetry;

final class Registered implements Event
{
/**
* @var Telemetry\Info
*/
private $telemetryInfo;

public function __construct(Telemetry\Info $telemetryInfo)
{
$this->telemetryInfo = $telemetryInfo;
}

public function telemetryInfo(): Telemetry\Info
{
return $this->telemetryInfo;
}
}
17 changes: 17 additions & 0 deletions src/Event/Comparator/RegisteredSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Event\Comparator;

use PHPUnit\Event\Subscriber;

interface RegisteredSubscriber extends Subscriber
{
public function notify(Registered $event): void;
}
Loading