From 7f5e0f0a3756e32af5872a0d5396ef17be2f1766 Mon Sep 17 00:00:00 2001 From: Rinat Gumirov Date: Fri, 4 Oct 2019 00:43:53 +0500 Subject: [PATCH] Add test for PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension --- .../Worksheet/ColumnDimensionTest.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/PhpSpreadsheetTests/Worksheet/ColumnDimensionTest.php diff --git a/tests/PhpSpreadsheetTests/Worksheet/ColumnDimensionTest.php b/tests/PhpSpreadsheetTests/Worksheet/ColumnDimensionTest.php new file mode 100644 index 00000000..1f31fdb9 --- /dev/null +++ b/tests/PhpSpreadsheetTests/Worksheet/ColumnDimensionTest.php @@ -0,0 +1,45 @@ +getColumnIndex(); + self::assertEquals($expected, $result); + } + + public function testGetAndSetColumnIndex() + { + $expected = 'B'; + $columnDimension = new ColumnDimension(); + $columnDimension->setColumnIndex($expected); + $result = $columnDimension->getColumnIndex(); + self::assertSame($expected, $result); + } + + public function testGetAndSetWidth() + { + $expected = 1.2; + $columnDimension = new ColumnDimension(); + $columnDimension->setWidth($expected); + $result = $columnDimension->getWidth(); + self::assertSame($expected, $result); + } + + public function testGetAndSetAutoSize() + { + $expected = true; + $columnDimension = new ColumnDimension(); + $columnDimension->setAutoSize($expected); + $result = $columnDimension->getAutoSize(); + self::assertSame($expected, $result); + } +}