setLayoutName() public method

public setLayoutName ( integer $layoutName ) : SlideLayout
$layoutName integer
return SlideLayout
 public function testLayoutName()
 {
     // Mocks
     $mockSlideMaster = $this->getMockForAbstractClass('PhpOffice\\PhpPresentation\\Slide\\SlideMaster');
     // Expected
     $expectedLayoutName = 'Title' . rand(1, 100);
     $object = new SlideLayout($mockSlideMaster);
     $this->assertNull($object->getLayoutName());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide\\SlideLayout', $object->setLayoutName($expectedLayoutName));
     $this->assertEquals($expectedLayoutName, $object->getLayoutName());
 }
 private function loadLayoutSlide($sPart, $baseFile, SlideMaster $oSlideMaster)
 {
     $xmlReader = new XMLReader();
     if ($xmlReader->getDomFromString($sPart)) {
         // Core
         $oSlideLayout = new SlideLayout($oSlideMaster);
         $oSlideLayout->setRelsIndex('ppt/slideLayouts/_rels/' . $baseFile . '.rels');
         // Name
         $oElement = $xmlReader->getElement('/p:sldLayout/p:cSld');
         if ($oElement && $oElement->hasAttribute('name')) {
             $oSlideLayout->setLayoutName($oElement->getAttribute('name'));
         }
         // Background
         $oElement = $xmlReader->getElement('/p:sldLayout/p:cSld/p:bg');
         if ($oElement) {
             $this->loadSlideBackground($xmlReader, $oElement, $oSlideLayout);
         }
         // ColorMapping
         $oElement = $xmlReader->getElement('/p:sldLayout/p:clrMapOvr/a:overrideClrMapping');
         if ($oElement && $oElement->hasAttributes()) {
             $colorMap = array();
             foreach ($oElement->attributes as $attr) {
                 $colorMap[$attr->nodeName] = $attr->nodeValue;
             }
             $oSlideLayout->colorMap->setMapping($colorMap);
         }
         // Shapes
         $oElements = $xmlReader->getElements('/p:sldLayout/p:cSld/p:spTree/*');
         if ($oElements) {
             $this->loadSlideShapes($oSlideLayout, $oElements, $xmlReader);
         }
         $this->arraySlideLayouts[$baseFile] =& $oSlideLayout;
         return $oSlideLayout;
     }
     return null;
 }