@@ -63,55 +63,6 @@ public function testCreateIsoDateWithDifferentFormats(): void
6363 $ this ->assertStringContainsString ('January ' , $ longFormat );
6464 }
6565
66- public function testGetTrackingFileDateValid (): void
67- {
68- $ filename = 'tracking25122023.log ' ; // 16 characters
69- $ result = $ this ->dateInstance ->getTrackingFileDate ($ filename );
70-
71- $ this ->assertIsInt ($ result );
72- $ this ->assertGreaterThan (0 , $ result );
73-
74- // Test that it's the beginning of the day
75- $ expectedDate = gmmktime (0 , 0 , 0 , 12 , 25 , 2023 );
76- $ this ->assertEquals ($ expectedDate , $ result );
77- }
78-
79- public function testGetTrackingFileDateEndOfDay (): void
80- {
81- $ filename = 'tracking25122023.log ' ;
82- $ result = $ this ->dateInstance ->getTrackingFileDate ($ filename , true );
83-
84- $ this ->assertIsInt ($ result );
85- $ this ->assertGreaterThan (0 , $ result );
86-
87- // Test that it's the end of the day
88- $ expectedDate = gmmktime (23 , 59 , 59 , 12 , 25 , 2023 );
89- $ this ->assertEquals ($ expectedDate , $ result );
90- }
91-
92- public function testGetTrackingFileDateInvalidFilename (): void
93- {
94- $ shortFilename = 'short.log ' ; // Less than 16 characters
95- $ result = $ this ->dateInstance ->getTrackingFileDate ($ shortFilename );
96-
97- $ this ->assertEquals (-1 , $ result );
98- }
99-
100- public function testGetTrackingFileDateWithDifferentFormats (): void
101- {
102- // Test various valid tracking file names
103- $ testFiles = [
104- 'tracking01012024.log ' , // New Year's Day 2024
105- 'tracking31122023.log ' , // New Year's Eve 2023
106- 'tracking29022024.log ' , // Leap year day 2024
107- ];
108-
109- foreach ($ testFiles as $ filename ) {
110- $ result = $ this ->dateInstance ->getTrackingFileDate ($ filename );
111- $ this ->assertGreaterThan (0 , $ result , "Failed for file: $ filename " );
112- }
113- }
114-
11566 public function testFormatWithValidDate (): void
11667 {
11768 $ inputDate = '2023-12-25 14:30:00 ' ;
0 commit comments