22
33namespace Cesargb \Log \Test ;
44
5- use Exception ;
65use Cesargb \Log \Rotation ;
7- use Cesargb \Log \Test \TestCase ;
86
97class RotationTest extends TestCase
108{
11- public function test_log_rotating_if_file_not_exists ()
9+ public function testLogRotatingIfFileNotExists ()
1210 {
13- $ this ->expectException (Exception::class);
14-
1511 $ rotation = new Rotation ();
1612
1713 $ result = $ rotation ->rotate (self ::DIR_WORK .'file.log ' );
1814
1915 $ this ->assertFalse ($ result );
2016 }
2117
22- public function test_not_rotate_if_file_is_empty ()
18+ public function testNotRotateIfFileIsEmpty ()
2319 {
2420 touch (self ::DIR_WORK .'file.log ' );
2521
@@ -32,7 +28,7 @@ public function test_not_rotate_if_file_is_empty()
3228 $ this ->assertFileDoesNotExist (self ::DIR_WORK .'file.log.1 ' );
3329 }
3430
35- public function test_option_nocompress ()
31+ public function testOptionNocompress ()
3632 {
3733 file_put_contents (self ::DIR_WORK .'file.log ' , microtime (true ));
3834
@@ -45,7 +41,7 @@ public function test_option_nocompress()
4541 $ this ->assertFileExists (self ::DIR_WORK .'file.log.1 ' );
4642 }
4743
48- public function test_option_compress ()
44+ public function testOptionCompress ()
4945 {
5046 file_put_contents (self ::DIR_WORK .'file.log ' , microtime (true ));
5147
@@ -56,7 +52,7 @@ public function test_option_compress()
5652 $ this ->assertFileExists (self ::DIR_WORK .'file.log.1.gz ' );
5753 }
5854
59- public function test_option_files ()
55+ public function testOptionFiles ()
6056 {
6157 $ maxFiles = 5 ;
6258
@@ -74,10 +70,9 @@ public function test_option_files()
7470 }
7571
7672 $ this ->assertFileDoesNotExist (self ::DIR_WORK .'file.log. ' .($ maxFiles + 1 ));
77-
7873 }
7974
80- public function test_option_files_only_one ()
75+ public function testOptionFilesOnlyOne ()
8176 {
8277 $ filesToCreate = 5 ;
8378
@@ -95,7 +90,7 @@ public function test_option_files_only_one()
9590 $ this ->assertFileDoesNotExist (self ::DIR_WORK .'file.log.2 ' );
9691 }
9792
98- public function test_option_minsize ()
93+ public function testOptionMinsize ()
9994 {
10095 file_put_contents (self ::DIR_WORK .'file.log ' , microtime (true ));
10196
0 commit comments