PhpOffice\PhpPresentation\Tests\AbstractShapeTest::testPlaceholder PHP Метод

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

public testPlaceholder ( )
    public function testPlaceholder()
    {
        $object = new RichText();
        $this->assertFalse($object->isPlaceholder(), 'Standard Shape should not be a placeholder object');
        $this->assertInstanceOf('PhpOffice\\PhpPresentation\\AbstractShape', $object->setPlaceHolder(new Placeholder(Placeholder::PH_TYPE_TITLE)));
        $this->assertTrue($object->isPlaceholder());
        $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Placeholder', $object->getPlaceholder());
        $this->assertEquals('title', $object->getPlaceholder()->getType());
        $object = new RichText();
        $this->assertFalse($object->isPlaceholder(), 'Standard Shape should not be a placeholder object');
        $placeholder = new Placeholder(Placeholder::PH_TYPE_TITLE);
        $placeholder->setType(Placeholder::PH_TYPE_SUBTITLE);
        $this->assertInstanceOf('PhpOffice\\PhpPresentation\\AbstractShape', $object->setPlaceHolder($placeholder));
        $this->assertTrue($object->isPlaceholder());
        $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Placeholder', $object->getPlaceholder());
        $this->assertEquals('subTitle', $object->getPlaceholder()->getType());
    }