getStyle()); } /** * Get style name. */ public function testStyleText(): void { $oTextBox = new TextBox('textBoxStyle'); self::assertEquals('textBoxStyle', $oTextBox->getStyle()); } /** * Get style array. */ public function testStyleArray(): void { $oTextBox = new TextBox( [ 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4.5), 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(17.5), 'positioning' => 'absolute', 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15.4), 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(9.9), 'stroke' => 0, 'innerMargin' => 0, 'borderSize' => 1, 'borderColor' => '', ] ); self::assertInstanceOf('PhpOffice\\PhpWord\\Style\\TextBox', $oTextBox->getStyle()); } }