Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"php": "^8.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"phpunit/phpunit": "^11.5",
"broadway/coding-standard": "^1.2",
"phpstan/phpstan": "^2.0",
"phpspec/prophecy": "^1.15"
"phpspec/prophecy": "^1.15",
"phpspec/prophecy-phpunit": "^2.2"
},
"authors": [
{
Expand Down
5 changes: 2 additions & 3 deletions examples/HandlingSensitiveDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Broadway\EventHandling\SimpleEventBus;
use Broadway\EventHandling\TraceableEventBus;
use Broadway\EventStore\InMemoryEventStore;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

require_once __DIR__.'/HandlingSensitiveData.php';
Expand Down Expand Up @@ -54,9 +55,7 @@ public function setUp(): void
$this->eventBus->subscribe($sensitiveDataManager);
}

/**
* @test
*/
#[Test]
public function it_handles_sensitive_data()
{
$this->eventBus->trace();
Expand Down
34 changes: 12 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Test Suite">
<directory>./test/</directory>
<directory>./examples/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<phpunit backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>./test/</directory>
<directory>./examples/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
8 changes: 5 additions & 3 deletions test/SensitiveDataManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@

use Broadway\Domain\DomainMessage;
use Broadway\Domain\Metadata;
use PHPUnit\Framework\Attributes\Test;
use Prophecy\PhpUnit\ProphecyTrait;

class SensitiveDataManagerTest extends \PHPUnit\Framework\TestCase
{
/**
* @test
*/
use ProphecyTrait;

#[Test]
public function it_publishes_events_and_sensitive_date_to_subscribed_processors()
{
$domainMessage = DomainMessage::recordNow(1, 1, new Metadata([]), new \stdClass());
Expand Down
5 changes: 2 additions & 3 deletions test/SensitiveDataProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@

use Broadway\Domain\DomainMessage;
use Broadway\Domain\Metadata;
use PHPUnit\Framework\Attributes\Test;

class SensitiveDataProcessorTest extends \PHPUnit\Framework\TestCase
{
/**
* @test
*/
#[Test]
public function it_passes_the_event_and_domain_message_and_sensitive_data()
{
$testProcessor = new TestProcessor();
Expand Down
6 changes: 3 additions & 3 deletions test/SensitiveDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

namespace Broadway\BroadwaySensitiveData\EventHandling;

use PHPUnit\Framework\Attributes\Test;

class SensitiveDataTest extends \PHPUnit\Framework\TestCase
{
/**
* @test
*/
#[Test]
public function it_exposes_its_properties()
{
$data = ['foo' => 'bar'];
Expand Down