PhpPresentation\Tests\Writer\PowerPoint2007\CommentAuthorsTest::testComments PHP Method

testComments() public method

public testComments ( )
    public function testComments()
    {
        $expectedElement = '/p:cmAuthorLst/p:cmAuthor';
        $expectedName = 'Name';
        $expectedInitials = 'Initials';
        $oAuthor = new Comment\Author();
        $oAuthor->setName($expectedName);
        $oAuthor->setInitials($expectedInitials);
        $oComment = new Comment();
        $oComment->setAuthor($oAuthor);
        $this->oPresentation->getActiveSlide()->addShape($oComment);
        $pres = TestHelperDOCX::getDocument($this->oPresentation, 'PowerPoint2007');
        $this->assertTrue($pres->fileExists('ppt/commentAuthors.xml'));
        $this->assertTrue($pres->elementExists($expectedElement, 'ppt/commentAuthors.xml'));
        $this->assertEquals(0, $pres->getElementAttribute($expectedElement, 'id', 'ppt/commentAuthors.xml'));
        $this->assertEquals($expectedName, $pres->getElementAttribute($expectedElement, 'name', 'ppt/commentAuthors.xml'));
        $this->assertEquals($expectedInitials, $pres->getElementAttribute($expectedElement, 'initials', 'ppt/commentAuthors.xml'));
    }