Skip to content

Commit e88aa7c

Browse files
committed
Split ray, monolog and sentry tests
1 parent 8002861 commit e88aa7c

File tree

3 files changed

+115
-0
lines changed

3 files changed

+115
-0
lines changed

tests/Feature/MonologTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
class MonologTest extends TestCase
99
{
10+
protected function setUp(): void
11+
{
12+
parent::setUp();
13+
14+
ray()->disable();
15+
}
16+
1017
function test_debug()
1118
{
1219
logger()->debug('Hello debug', [
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Tests\Feature;
5+
6+
use Tests\TestCase;
7+
8+
class RayApplicationLogTest extends TestCase
9+
{
10+
protected function setUp(): void
11+
{
12+
parent::setUp();
13+
14+
logger()->setDefaultDriver('null');
15+
}
16+
17+
function test_debug()
18+
{
19+
logger()->debug('Hello debug', [
20+
'foo' => 'bar'
21+
]);
22+
23+
$this->assertTrue(true);
24+
}
25+
26+
function test_info()
27+
{
28+
logger()->info('Hello info', [
29+
'foo' => 'bar'
30+
]);
31+
32+
$this->assertTrue(true);
33+
}
34+
35+
function test_warning()
36+
{
37+
logger()->warning('Hello warning', [
38+
'foo' => 'bar'
39+
]);
40+
41+
$this->assertTrue(true);
42+
}
43+
44+
function test_error()
45+
{
46+
logger()->error('Hello error', [
47+
'foo' => 'bar'
48+
]);
49+
50+
$this->assertTrue(true);
51+
}
52+
53+
function test_critical()
54+
{
55+
logger()->critical('Hello critical', [
56+
'foo' => 'bar'
57+
]);
58+
59+
$this->assertTrue(true);
60+
}
61+
62+
function test_notice()
63+
{
64+
logger()->notice('Hello notice', [
65+
'foo' => 'bar'
66+
]);
67+
68+
$this->assertTrue(true);
69+
}
70+
71+
function test_alert()
72+
{
73+
logger()->alert('Hello alert', [
74+
'foo' => 'bar'
75+
]);
76+
77+
$this->assertTrue(true);
78+
}
79+
80+
function test_emergency()
81+
{
82+
logger()->emergency('Hello emergency', [
83+
'foo' => 'bar'
84+
]);
85+
86+
$this->assertTrue(true);
87+
}
88+
89+
function test_exception()
90+
{
91+
try {
92+
throw new \Exception('Something went wrong');
93+
} catch (\Throwable $e) {
94+
logger()->error($e);
95+
}
96+
97+
98+
$this->assertTrue(true);
99+
}
100+
}

tests/Feature/SentryTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
class SentryTest extends TestCase
99
{
10+
protected function setUp(): void
11+
{
12+
parent::setUp();
13+
14+
ray()->disable();
15+
logger()->setDefaultDriver('null');
16+
}
17+
1018
function test_report()
1119
{
1220
try {

0 commit comments

Comments
 (0)