Skip to content

Commit ee35b30

Browse files
committed
add test for justifyLastLine functionality in Alignment
1 parent d0fc40a commit ee35b30

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/PhpSpreadsheetTests/Style/AlignmentTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ public function testHorizontal(): void
8484
self::assertEquals(0, $cell3->getStyle()->getAlignment()->getIndent());
8585
}
8686

87+
public function testJustifyLastLine(): void
88+
{
89+
$this->spreadsheet = new Spreadsheet();
90+
$sheet = $this->spreadsheet->getActiveSheet();
91+
$cell1 = $sheet->getCell('A1');
92+
$cell1->setValue('ABC');
93+
$cell1->getStyle()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_DISTRIBUTED);
94+
$cell1->getStyle()->getAlignment()->setJustifyLastLine(true);
95+
self::assertTrue($cell1->getStyle()->getAlignment()->getJustifyLastLine());
96+
}
97+
8798
public function testReadOrder(): void
8899
{
89100
$this->spreadsheet = new Spreadsheet();

0 commit comments

Comments
 (0)