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

testWithSameAuthor() public method

public testWithSameAuthor ( )
    public function testWithSameAuthor()
    {
        $expectedElement = '/p:cmAuthorLst/p:cmAuthor';
        $oAuthor = new Comment\Author();
        $oComment1 = new Comment();
        $oComment1->setAuthor($oAuthor);
        $this->oPresentation->getActiveSlide()->addShape($oComment1);
        $oComment2 = new Comment();
        $oComment2->setAuthor($oAuthor);
        $this->oPresentation->getActiveSlide()->addShape($oComment2);
        $pres = TestHelperDOCX::getDocument($this->oPresentation, 'PowerPoint2007');
        $this->assertTrue($pres->fileExists('ppt/commentAuthors.xml'));
        $this->assertTrue($pres->fileExists('ppt/commentAuthors.xml'));
        $this->assertTrue($pres->elementExists($expectedElement, 'ppt/commentAuthors.xml'));
        $this->assertEquals(1, $pres->elementCount($expectedElement, 'ppt/commentAuthors.xml'));
    }