Skip to content

Commit

Permalink
fix(tests): Avoid conflict in namespace
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Update tests to use the TestUtils namespace
  • Loading branch information
morrislaptop committed Mar 29, 2020
1 parent 327c37e commit 6aa274b
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Constraint;
namespace DigitalRisks\LaravelEventStore\TestUtils\Constraint;

use PHPUnit\Framework\ExpectationFailedException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Constraint;
namespace DigitalRisks\LaravelEventStore\TestUtils\Constraint;

use PHPUnit\Framework\ExpectationFailedException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Constraint;
namespace DigitalRisks\LaravelEventStore\TestUtils\Constraint;

use DigitalRisks\LaravelEventStore\Client;
use GuzzleHttp\Exception\ClientException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Constraint;
namespace DigitalRisks\LaravelEventStore\TestUtils\Constraint;

use PHPUnit\Framework\ExpectationFailedException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Traits;
namespace DigitalRisks\LaravelEventStore\TestUtils\Traits;

use DigitalRisks\LaravelEventStore\Client;
use DigitalRisks\LaravelEventStore\Tests\Constraint\EventNotOnEventStoreConstraint;
use DigitalRisks\LaravelEventStore\Tests\Constraint\EventOnEventStoreConstraint;
use DigitalRisks\LaravelEventStore\Tests\Constraint\EventsOnEventStoreConstraint;
use DigitalRisks\LaravelEventStore\TestUtils\Constraint\EventNotOnEventStoreConstraint;
use DigitalRisks\LaravelEventStore\TestUtils\Constraint\EventOnEventStoreConstraint;
use DigitalRisks\LaravelEventStore\TestUtils\Constraint\EventsOnEventStoreConstraint;

trait InteractsWithEventStore
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace DigitalRisks\LaravelEventStore\Tests\Traits;
namespace DigitalRisks\LaravelEventStore\TestUtils\Traits;

use Illuminate\Support\Carbon;
use Rxnet\EventStore\Data\EventRecord;
Expand Down
4 changes: 2 additions & 2 deletions tests/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace DigitalRisks\LaravelEventStore\Tests;

use DigitalRisks\LaravelEventStore\Console\Commands\EventStoreWorkerThread;
use DigitalRisks\LaravelEventStore\Tests\Traits\MakesEventRecords;
use DigitalRisks\LaravelEventStore\TestUtils\Traits\MakesEventRecords as TraitsMakesEventRecords;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Log;
use TiMacDonald\Log\LogFake;

class LoggerTest extends TestCase
{
use MakesEventRecords;
use TraitsMakesEventRecords;

public function test_it_logs_an_event()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ReceivesEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use DigitalRisks\LaravelEventStore\Contracts\CouldBeReceived;
use DigitalRisks\LaravelEventStore\Contracts\ShouldBeStored;
use DigitalRisks\LaravelEventStore\Tests\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\TestUtils\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\Traits\AddsLaravelMetadata;
use DigitalRisks\LaravelEventStore\Traits\ReceivedFromEventStore;
use DigitalRisks\LaravelEventStore\Traits\SendsToEventStore;
Expand Down
2 changes: 1 addition & 1 deletion tests/SendsEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace DigitalRisks\LaravelEventStore\Tests;

use DigitalRisks\LaravelEventStore\Contracts\ShouldBeStored;
use DigitalRisks\LaravelEventStore\Tests\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\TestUtils\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\Traits\SendsToEventStore;

class SendsEventTest extends TestCase
Expand Down
4 changes: 2 additions & 2 deletions tests/WorkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use DigitalRisks\LaravelEventStore\Console\Commands\EventStoreWorkerThread;
use DigitalRisks\LaravelEventStore\EventStore;
use DigitalRisks\LaravelEventStore\Tests\Fixtures\TestEvent;
use DigitalRisks\LaravelEventStore\Tests\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\Tests\Traits\MakesEventRecords;
use DigitalRisks\LaravelEventStore\TestUtils\Traits\InteractsWithEventStore;
use DigitalRisks\LaravelEventStore\TestUtils\Traits\MakesEventRecords;
use Illuminate\Support\Facades\Event;
use Rxnet\EventStore\Record\EventRecord;

Expand Down

0 comments on commit 6aa274b

Please sign in to comment.