mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 02:48:16 +00:00
ec4098c8fd
While we might never be able to have 100% of our code strict, we can at the very least do it for all of our tests. This ensures that our tests are using our API with the types as intended by the test author, and not silently be cast to what our API requires.
27 lines
796 B
PHP
27 lines
796 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Writer\Html;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
|
use PhpOffice\PhpSpreadsheet\Writer\Html;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class TextRotationTest extends TestCase
|
|
{
|
|
public function testTextRotation(): void
|
|
{
|
|
$spreadsheet = new Spreadsheet();
|
|
$sheet = $spreadsheet->getActiveSheet();
|
|
$sheet->setPrintGridlines(true);
|
|
$sheet->getStyle('A7')->getAlignment()->setTextRotation(90);
|
|
$sheet->setCellValue('A7', 'Lorem Ipsum');
|
|
$writer = new Html($spreadsheet);
|
|
$html = $writer->generateHtmlAll();
|
|
self::assertStringContainsString(' transform:rotate(90deg);', $html);
|
|
$spreadsheet->disconnectWorksheets();
|
|
unset($spreadsheet);
|
|
}
|
|
}
|