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

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

Set Italic
public setItalic ( boolean $pValue = false ) : Font
$pValue boolean
Результат Font
    public function setItalic($pValue = false)
    {
        if ($pValue == '') {
            $pValue = false;
        }
        $this->italic = $pValue;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Test get/set italic
  */
 public function testSetIsItalic()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setItalic());
     $this->assertFalse($object->isItalic());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setItalic(''));
     $this->assertFalse($object->isItalic());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setItalic(false));
     $this->assertFalse($object->isItalic());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setItalic(true));
     $this->assertTrue($object->isItalic());
 }