PhpOffice\PhpPresentation\Style\Font::setUnderline PHP Метод

setUnderline() публичный Метод

Set Underline
public setUnderline ( string $pValue = self::UNDERLINE_NONE ) : Font
$pValue string \PhpOffice\PhpPresentation\Style\Font underline type
Результат Font
    public function setUnderline($pValue = self::UNDERLINE_NONE)
    {
        if ($pValue == '') {
            $pValue = self::UNDERLINE_NONE;
        }
        $this->underline = $pValue;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Test get/set underline
  */
 public function testSetGetUnderline()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setUnderline());
     $this->assertEquals(FONT::UNDERLINE_NONE, $object->getUnderline());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setUnderline(''));
     $this->assertEquals(FONT::UNDERLINE_NONE, $object->getUnderline());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setUnderline(FONT::UNDERLINE_DASH));
     $this->assertEquals(FONT::UNDERLINE_DASH, $object->getUnderline());
 }