Skip to content

Commit

Permalink
Add phpunit support to 0.x branch (#540)
Browse files Browse the repository at this point in the history
* Fix test class name for phpunit 10 compatibility

* Use static data providers for phpunit 10 support
  • Loading branch information
athos-ribeiro committed Dec 19, 2023
1 parent e25548b commit 8947a2f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/Eluceo/iCal/ParameterBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testParamEscaping($value, $expected)
);
}

public function escapedParamsDataProvider()
public static function escapedParamsDataProvider()
{
return [
'No escaping necessary' => ['test string', 'TEST=test string'],
Expand Down
2 changes: 1 addition & 1 deletion tests/Eluceo/iCal/Property/ArrayValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testArrayValue($values, $expectedOutput)
$this->assertEquals($expectedOutput, $arrayValue->getEscapedValue());
}

public function arrayValuesProvider()
public static function arrayValuesProvider()
{
return array(
array(array(), ''),
Expand Down
14 changes: 7 additions & 7 deletions tests/Eluceo/iCal/Property/Event/RecurrenceRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function testSetByMonth()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYMONTH=1', $rule->getEscapedValue());
}

public function invalidMonthProvider()
public static function invalidMonthProvider()
{
return [
['invalid_month'],
Expand Down Expand Up @@ -132,7 +132,7 @@ public function testSetByWeekNo()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYWEEKNO=1', $rule->getEscapedValue());
}

public function invalidByWeekNoProvider()
public static function invalidByWeekNoProvider()
{
return [
[0],
Expand Down Expand Up @@ -162,7 +162,7 @@ public function testSetByYearDay()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYYEARDAY=1', $rule->getEscapedValue());
}

public function invalidByYearDayProvider()
public static function invalidByYearDayProvider()
{
return [
[0],
Expand Down Expand Up @@ -192,7 +192,7 @@ public function testSetByMonthDay()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYMONTHDAY=1', $rule->getEscapedValue());
}

public function invalidByMonthDayProvider()
public static function invalidByMonthDayProvider()
{
return [
[0],
Expand Down Expand Up @@ -222,7 +222,7 @@ public function testSetByHour()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYHOUR=1', $rule->getEscapedValue());
}

public function invalidByHourProvider()
public static function invalidByHourProvider()
{
return [
[0.0001],
Expand Down Expand Up @@ -251,7 +251,7 @@ public function testSetByMinute()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYMINUTE=1', $rule->getEscapedValue());
}

public function invalidByMinuteProvider()
public static function invalidByMinuteProvider()
{
return [
[0.0001],
Expand Down Expand Up @@ -280,7 +280,7 @@ public function testSetBySecond()
$this->assertSame('FREQ=YEARLY;INTERVAL=1;BYSECOND=1', $rule->getEscapedValue());
}

public function invalidBySecondProvider()
public static function invalidBySecondProvider()
{
return [
[0.0001],
Expand Down
2 changes: 1 addition & 1 deletion tests/Eluceo/iCal/Property/RawStringValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHPUnit\Framework\TestCase;

class RawStringValuetTest extends TestCase
class RawStringValueTest extends TestCase
{
public function testGetEscapedValue()
{
Expand Down

0 comments on commit 8947a2f

Please sign in to comment.