Skip to content

Commit 1fbcf15

Browse files
authored
ref(tests): move ClockMock into tests (#1983)
1 parent 082d705 commit 1fbcf15

File tree

10 files changed

+9
-11
lines changed

10 files changed

+9
-11
lines changed

psalm.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<directory name="src" />
1111
<ignoreFiles>
1212
<directory name="vendor" />
13-
<file name="src/Util/ClockMock.php" />
1413
</ignoreFiles>
1514
</projectFiles>
1615

tests/BreadcrumbTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use PHPUnit\Framework\TestCase;
88
use Sentry\Breadcrumb;
9-
use Sentry\Util\ClockMock;
9+
use Sentry\Tests\TestUtil\ClockMock;
1010

1111
final class BreadcrumbTest extends TestCase
1212
{

tests/Metrics/MetricsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use Sentry\Options;
1212
use Sentry\SentrySdk;
1313
use Sentry\State\Hub;
14+
use Sentry\Tests\TestUtil\ClockMock;
1415
use Sentry\Tracing\SpanContext;
1516
use Sentry\Tracing\TransactionContext;
16-
use Sentry\Util\ClockMock;
1717

1818
use function Sentry\metrics;
1919

tests/Serializer/PayloadSerializerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Sentry\Serializer\PayloadSerializer;
2929
use Sentry\Severity;
3030
use Sentry\Stacktrace;
31+
use Sentry\Tests\TestUtil\ClockMock;
3132
use Sentry\Tracing\DynamicSamplingContext;
3233
use Sentry\Tracing\Span;
3334
use Sentry\Tracing\SpanId;
@@ -36,7 +37,6 @@
3637
use Sentry\Tracing\TransactionMetadata;
3738
use Sentry\Unit;
3839
use Sentry\UserDataBag;
39-
use Sentry\Util\ClockMock;
4040
use Sentry\Util\SentryUid;
4141

4242
/**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* THE SOFTWARE.
2727
*/
2828

29-
namespace Sentry\Util;
29+
namespace Sentry\Tests\TestUtil;
3030

3131
/**
3232
* @author Nicolas Grekas <p@tchwork.com>

tests/Tracing/SpanTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
namespace Sentry\Tests\Tracing;
66

77
use PHPUnit\Framework\TestCase;
8+
use Sentry\Tests\TestUtil\ClockMock;
89
use Sentry\Tracing\Span;
910
use Sentry\Tracing\SpanContext;
1011
use Sentry\Tracing\SpanId;
1112
use Sentry\Tracing\TraceId;
1213
use Sentry\Tracing\Transaction;
1314
use Sentry\Tracing\TransactionContext;
14-
use Sentry\Util\ClockMock;
1515

1616
/**
1717
* @group time-sensitive

tests/Tracing/TransactionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
use Sentry\Options;
1313
use Sentry\State\Hub;
1414
use Sentry\State\HubInterface;
15-
use Sentry\Tracing\Span;
15+
use Sentry\Tests\TestUtil\ClockMock;
1616
use Sentry\Tracing\SpanContext;
1717
use Sentry\Tracing\Transaction;
1818
use Sentry\Tracing\TransactionContext;
19-
use Sentry\Util\ClockMock;
2019

2120
/**
2221
* @group time-sensitive

tests/Transport/HttpTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Sentry\Options;
1515
use Sentry\Profiling\Profile;
1616
use Sentry\Serializer\PayloadSerializerInterface;
17+
use Sentry\Tests\TestUtil\ClockMock;
1718
use Sentry\Transport\HttpTransport;
1819
use Sentry\Transport\ResultStatus;
19-
use Sentry\Util\ClockMock;
2020

2121
final class HttpTransportTest extends TestCase
2222
{

tests/Transport/RateLimiterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use PHPUnit\Framework\TestCase;
88
use Sentry\EventType;
99
use Sentry\HttpClient\Response;
10+
use Sentry\Tests\TestUtil\ClockMock;
1011
use Sentry\Transport\RateLimiter;
11-
use Sentry\Util\ClockMock;
1212

1313
/**
1414
* @group time-sensitive

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use Sentry\Breadcrumb;
66
use Sentry\Event;
77
use Sentry\Metrics\Metrics;
8+
use Sentry\Tests\TestUtil\ClockMock;
89
use Sentry\Tracing\Span;
910
use Sentry\Transport\RateLimiter;
10-
use Sentry\Util\ClockMock;
1111

1212
require_once __DIR__ . '/../vendor/autoload.php';
1313

0 commit comments

Comments
 (0)