Release 2.12 (#4609)
This commit is contained in:
@@ -23,16 +23,16 @@ abstract class AbstractFormatterTest extends TestCase
|
||||
|
||||
abstract protected function getExpectedValue();
|
||||
|
||||
protected function assertCellStyle(Style $style)
|
||||
public function assertCellStyle(Style $style): void
|
||||
{
|
||||
}
|
||||
|
||||
protected function assertCellValue(Cell $cell)
|
||||
public function assertCellValue(Cell $cell): void
|
||||
{
|
||||
self::assertEquals($this->getExpectedValue(), $cell->getValue());
|
||||
}
|
||||
|
||||
public function testSetFormattedValue()
|
||||
public function testSetFormattedValue(): void
|
||||
{
|
||||
$sut = $this->getFormatter();
|
||||
|
||||
@@ -45,7 +45,7 @@ abstract class AbstractFormatterTest extends TestCase
|
||||
$this->assertCellStyle($worksheet->getStyleByColumnAndRow(1, 1));
|
||||
}
|
||||
|
||||
public function testSetNull()
|
||||
public function testSetNull(): void
|
||||
{
|
||||
$sut = $this->getFormatter();
|
||||
|
||||
@@ -57,7 +57,7 @@ abstract class AbstractFormatterTest extends TestCase
|
||||
$this->assertNullValue($cell);
|
||||
}
|
||||
|
||||
protected function assertNullValue(Cell $cell)
|
||||
public function assertNullValue(Cell $cell): void
|
||||
{
|
||||
self::assertEquals('', $cell->getValue());
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class ArrayFormatterTest extends AbstractFormatterTest
|
||||
return 'test;foo;bar';
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only array is supported');
|
||||
|
||||
@@ -33,7 +33,7 @@ class BooleanFormatterTest extends AbstractFormatterTest
|
||||
return false;
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only boolean is supported');
|
||||
|
||||
@@ -38,7 +38,7 @@ class DateFormatterTest extends AbstractFormatterTest
|
||||
return Date::PHPToExcel($this->date);
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only DateTimeInterface is supported');
|
||||
@@ -50,7 +50,7 @@ class DateFormatterTest extends AbstractFormatterTest
|
||||
$sut->setFormattedValue($worksheet, 1, 1, 'sdfsdf');
|
||||
}
|
||||
|
||||
protected function assertCellStyle(Style $style)
|
||||
public function assertCellStyle(Style $style): void
|
||||
{
|
||||
self::assertEquals(NumberFormat::FORMAT_DATE_YYYYMMDD2, $style->getNumberFormat()->getFormatCode());
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class DateTimeFormatterTest extends AbstractFormatterTest
|
||||
return Date::PHPToExcel($this->date);
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only DateTimeInterface is supported');
|
||||
@@ -49,7 +49,7 @@ class DateTimeFormatterTest extends AbstractFormatterTest
|
||||
$sut->setFormattedValue($worksheet, 1, 1, 'sdfsdf');
|
||||
}
|
||||
|
||||
protected function assertCellStyle(Style $style)
|
||||
public function assertCellStyle(Style $style): void
|
||||
{
|
||||
self::assertEquals(DateTimeFormatter::DATETIME_FORMAT, $style->getNumberFormat()->getFormatCode());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class DurationFormatterTest extends AbstractFormatterTest
|
||||
return '=3600/86400';
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only int is supported');
|
||||
@@ -47,12 +47,12 @@ class DurationFormatterTest extends AbstractFormatterTest
|
||||
$sut->setFormattedValue($worksheet, 1, 1, 'sdfsdf');
|
||||
}
|
||||
|
||||
protected function assertNullValue(Cell $cell)
|
||||
public function assertNullValue(Cell $cell): void
|
||||
{
|
||||
self::assertEquals('=0/86400', $cell->getValue());
|
||||
}
|
||||
|
||||
protected function assertCellStyle(Style $style)
|
||||
public function assertCellStyle(Style $style): void
|
||||
{
|
||||
self::assertEquals(DurationFormatter::DURATION_FORMAT, $style->getNumberFormat()->getFormatCode());
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class TimeFormatterTest extends AbstractFormatterTest
|
||||
return Date::PHPToExcel($this->date);
|
||||
}
|
||||
|
||||
public function testFormattedValueWithInvalidValue()
|
||||
public function testFormattedValueWithInvalidValue(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Unsupported value given, only DateTimeInterface is supported');
|
||||
@@ -49,7 +49,7 @@ class TimeFormatterTest extends AbstractFormatterTest
|
||||
$sut->setFormattedValue($worksheet, 1, 1, 'sdfsdf');
|
||||
}
|
||||
|
||||
protected function assertCellStyle(Style $style)
|
||||
public function assertCellStyle(Style $style): void
|
||||
{
|
||||
self::assertEquals(TimeFormatter::TIME_FORMAT, $style->getNumberFormat()->getFormatCode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user