Skip to content

Commit ab83aa8

Browse files
committed
Clean up tests for PHPUnit V10
1 parent 4ee1785 commit ab83aa8

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

tests/FileTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function testICSFiles(string $contents, string $file) : void
1919
$this->assertNotEmpty($contents);
2020
$calendar = new \ICalendarOrg\ZCiCal($contents);
2121
$generated = $calendar->export();
22-
// $this->assertEquals($this->clean($contents), $this->clean($generated), $file . ' has an error');
22+
2323
foreach (\explode("\n", $generated) as $line)
2424
{
2525
$this->assertLessThan(72, \strlen($file), "Line ->{$line}<- is too long (>72 chars)");
@@ -33,7 +33,7 @@ public function testICSFiles(string $contents, string $file) : void
3333
*
3434
* @return array<array<string, string>>
3535
*/
36-
public function providerICSFiles() : array
36+
public static function providerICSFiles() : array
3737
{
3838
$iterator = new \DirectoryIterator(__DIR__ . '/examples');
3939

@@ -50,16 +50,4 @@ public function providerICSFiles() : array
5050

5151
return $contents;
5252
}
53-
54-
private function clean(string $text) : string
55-
{
56-
$text = \str_replace("\r", '', $text);
57-
58-
while (\strpos($text, ' '))
59-
{
60-
$text = \str_replace(' ', ' ', $text);
61-
}
62-
63-
return $text;
64-
}
6553
}

tests/ZCiCalDataNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testZCiCalDataNode(string $line) : void
2626
*
2727
* @return array<array<string>>
2828
*/
29-
public function providerZCiCalDataNode() : array
29+
public static function providerZCiCalDataNode() : array
3030
{
3131
return [
3232
['ACTION:AUDIO'],

0 commit comments

Comments
 (0)