Skip to content

Commit f316cb3

Browse files
committed
Avoid using trait for test compat
1 parent f9af9f5 commit f316cb3

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

test/EventListener/ConsoleListenerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88
use Sentry\SentryBundle\Test\BaseTestCase;
99
use Sentry\State\HubInterface;
1010
use Sentry\State\Scope;
11-
use Symfony\Bridge\PhpUnit\SetUpTearDownTrait;
1211
use Symfony\Component\Console\Command\Command;
1312
use Symfony\Component\Console\Event\ConsoleCommandEvent;
1413
use Symfony\Component\Console\Input\InputInterface;
1514
use Symfony\Component\Console\Output\OutputInterface;
1615

1716
class ConsoleListenerTest extends BaseTestCase
1817
{
19-
use SetUpTearDownTrait;
20-
2118
private $currentHub;
2219
private $currentScope;
2320

24-
protected function doSetUp(): void
21+
protected function setUp(): void
2522
{
23+
parent::setUp();
24+
2625
$this->currentScope = $scope = new Scope();
2726
$this->currentHub = $this->prophesize(HubInterface::class);
2827
$this->currentHub->configureScope(Argument::type('callable'))

test/EventListener/RequestListenerTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Sentry\SentryBundle\Test\BaseTestCase;
1111
use Sentry\State\HubInterface;
1212
use Sentry\State\Scope;
13-
use Symfony\Bridge\PhpUnit\SetUpTearDownTrait;
1413
use Symfony\Component\HttpFoundation\Request;
1514
use Symfony\Component\HttpKernel\Event\ControllerEvent;
1615
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
@@ -21,14 +20,14 @@
2120

2221
class RequestListenerTest extends BaseTestCase
2322
{
24-
use SetUpTearDownTrait;
25-
2623
private $currentScope;
2724
private $currentHub;
2825
private $options;
2926

30-
protected function doSetUp(): void
27+
protected function setUp(): void
3128
{
29+
parent::setUp();
30+
3231
$this->currentScope = $scope = new Scope();
3332
$this->currentHub = $this->prophesize(HubInterface::class);
3433

test/EventListener/SubRequestListenerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66
use Sentry\SentryBundle\Test\BaseTestCase;
77
use Sentry\State\HubInterface;
88
use Sentry\State\Scope;
9-
use Symfony\Bridge\PhpUnit\SetUpTearDownTrait;
109
use Symfony\Component\HttpFoundation\Request;
1110
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
1211
use Symfony\Component\HttpKernel\KernelInterface;
1312

1413
class SubRequestListenerTest extends BaseTestCase
1514
{
16-
use SetUpTearDownTrait;
17-
1815
private $currentHub;
1916

20-
protected function doSetUp(): void
17+
protected function setUp(): void
2118
{
2219
$this->currentHub = $this->prophesize(HubInterface::class);
2320

0 commit comments

Comments
 (0)