Upgrade tests to PhpUnit 10 (#5252)
This commit is contained in:
@@ -25,7 +25,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
$this->sut = new DurationStringToSecondsTransformer();
|
||||
}
|
||||
|
||||
public function getValidTestDataTransform(): array
|
||||
public static function getValidTestDataTransform(): array
|
||||
{
|
||||
return [
|
||||
['0:00', '0'],
|
||||
@@ -37,7 +37,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function getInvalidTestDataTransform(): array
|
||||
public static function getInvalidTestDataTransform(): array
|
||||
{
|
||||
return [
|
||||
[''],
|
||||
@@ -50,7 +50,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
*/
|
||||
public function testTransform($expected, $transform): void
|
||||
{
|
||||
$this->assertEquals($expected, $this->sut->transform($transform));
|
||||
self::assertEquals($expected, $this->sut->transform($transform));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,13 +59,13 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
public function testInvalidTransformThrowsException($transform): void
|
||||
{
|
||||
$value = $this->sut->transform($transform);
|
||||
$this->assertNull($value);
|
||||
self::assertNull($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<int, string|int|float|null>>
|
||||
*/
|
||||
public function getValidTestDataReverseTransform(): array
|
||||
public static function getValidTestDataReverseTransform(): array
|
||||
{
|
||||
return [
|
||||
['2h3s', 7203],
|
||||
@@ -81,7 +81,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
/**
|
||||
* @return array<int, array<int, string|int>>
|
||||
*/
|
||||
public function getInvalidTestDataReverseTransform(): array
|
||||
public static function getInvalidTestDataReverseTransform(): array
|
||||
{
|
||||
return [
|
||||
['xxx'],
|
||||
@@ -99,7 +99,7 @@ class DurationStringToSecondsTransformerTest extends TestCase
|
||||
*/
|
||||
public function testReverseTransform($transform, $expected): void
|
||||
{
|
||||
$this->assertEquals($expected, $this->sut->reverseTransform($transform));
|
||||
self::assertEquals($expected, $this->sut->reverseTransform($transform));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user