assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\AbstractSlide', $object); $this->assertNull($object->getParent()); $this->assertInstanceOf('\\ArrayObject', $object->getShapeCollection()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\ColorMap', $object->colorMap); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\Background\\Color', $object->getBackground()); $this->assertEquals('FFFFFF', $object->getBackground()->getColor()->getRGB()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\TextStyle', $object->getTextStyles()); } public function testLayout() { $object = new SlideMaster(); // Mock Post $mockSlideLayout = $this->getMockForAbstractClass('PhpOffice\PhpPresentation\Slide\SlideLayout', array($object)); $this->assertEmpty($object->getAllSlideLayouts()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideLayout', $object->createSlideLayout()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideLayout', $object->addSlideLayout($mockSlideLayout)); $this->assertCount(2, $object->getAllSlideLayouts()); } public function testSchemeColors() { // Mock Pre $mockSchemeColorAccent1 = $this->getMockForAbstractClass('PhpOffice\PhpPresentation\Style\SchemeColor'); $mockSchemeColorAccent1->setValue('accent1'); $mockSchemeColorAccent1->setRGB('ABCDEF'); $mockSchemeColorNew = $this->getMockForAbstractClass('PhpOffice\PhpPresentation\Style\SchemeColor'); $mockSchemeColorNew->setValue('new'); $mockSchemeColorNew->setRGB('ABCDEF'); $object = new SlideMaster(); $this->assertInternalType('array', $object->getAllSchemeColors()); $this->assertCount(12, $object->getAllSchemeColors()); // Add idem value $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideMaster', $object->addSchemeColor($mockSchemeColorAccent1)); $this->assertCount(12, $object->getAllSchemeColors()); // Add new value $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideMaster', $object->addSchemeColor($mockSchemeColorNew)); $this->assertCount(13, $object->getAllSchemeColors()); } public function testTextStyles() { // Mock Pre $mockTextStyle = $this->getMockForAbstractClass('PhpOffice\PhpPresentation\Style\TextStyle'); $object = new SlideMaster(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\TextStyle', $object->getTextStyles()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideMaster', $object->setTextStyles($mockTextStyle)); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\TextStyle', $object->getTextStyles()); } }