Skip to content

Commit 16ee20e

Browse files
committed
ICL: Test names fixed.
1 parent ed8747d commit 16ee20e

File tree

2 files changed

+38
-34
lines changed

2 files changed

+38
-34
lines changed

tests/FileHandlerTest.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,6 @@ public function it_provides_automatic_file_rotation_and_only_30_latest_files_are
8181
$this->assertCount(30, File::files($path));
8282
}
8383

84-
/** @test */
85-
public function it_supports_psr3_methods_for_logging()
86-
{
87-
Artisan::call('generic');
88-
89-
$this->assertLogFileContains("generic/{$this->date}.log", [
90-
'[%datetime%]: [DEBUG]: Debug!',
91-
'[%datetime%]: [INFO]: Info!',
92-
'[%datetime%]: [NOTICE]: Notice!',
93-
'[%datetime%]: [WARNING]: Warning!',
94-
'[%datetime%]: [ERROR]: Error!',
95-
'[%datetime%]: [CRITICAL]: Critical!',
96-
'[%datetime%]: [ALERT]: Alert!',
97-
'[%datetime%]: [EMERGENCY]: Emergency!',
98-
]);
99-
}
100-
10184
/** @test */
10285
public function it_supports_separator_in_psr3_methods_which_is_transformed_to_11_blank_lines()
10386
{
@@ -109,23 +92,6 @@ public function it_supports_separator_in_psr3_methods_which_is_transformed_to_11
10992
]);
11093
}
11194

112-
/** @test */
113-
public function it_supports_context_for_psr3_methods_which_is_transformed_to_readable_dump()
114-
{
115-
Artisan::call('command-with-context-logging');
116-
117-
$this->assertLogFileContains("command-with-context-logging/{$this->date}.log", [
118-
'Testing context!',
119-
'Some log with data.',
120-
get_dump([
121-
'foo' => 'bar',
122-
'baz' => 111,
123-
'faz' => true,
124-
3 => null,
125-
]),
126-
]);
127-
}
128-
12995
private function createBunchOfOldLogsInCount45($path)
13096
{
13197
if (!File::isDirectory($path)) {

tests/LoggableTraitTest.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
class LoggableTraitTest extends TestCase
4+
{
5+
/** @test */
6+
public function it_supports_psr3_methods_for_logging()
7+
{
8+
Artisan::call('generic');
9+
10+
$this->assertLogFileContains("generic/{$this->date}.log", [
11+
'[%datetime%]: [DEBUG]: Debug!',
12+
'[%datetime%]: [INFO]: Info!',
13+
'[%datetime%]: [NOTICE]: Notice!',
14+
'[%datetime%]: [WARNING]: Warning!',
15+
'[%datetime%]: [ERROR]: Error!',
16+
'[%datetime%]: [CRITICAL]: Critical!',
17+
'[%datetime%]: [ALERT]: Alert!',
18+
'[%datetime%]: [EMERGENCY]: Emergency!',
19+
]);
20+
}
21+
22+
/** @test */
23+
public function it_supports_context_for_psr3_methods_which_is_transformed_to_readable_dump()
24+
{
25+
Artisan::call('command-with-context-logging');
26+
27+
$this->assertLogFileContains("command-with-context-logging/{$this->date}.log", [
28+
'Testing context!',
29+
'Some log with data.',
30+
get_dump([
31+
'foo' => 'bar',
32+
'baz' => 111,
33+
'faz' => true,
34+
3 => null,
35+
]),
36+
]);
37+
}
38+
}

0 commit comments

Comments
 (0)