示例#1
0
 public function testSetWithExistingStyleWithSameIndex()
 {
     $fill = new Fill();
     $fill->setColor('000000');
     $this->assertEquals('ffffff', $this->styleCollection[0]->getColor());
     $this->styleCollection->set(0, $fill);
     $this->assertEquals('000000', $this->styleCollection[0]->getColor());
     $this->assertCount(2, $this->styleCollection);
 }
示例#2
0
 /**
  * Fill management
  *
  * @param Fill $fill
  *
  * @return array
  */
 private function fillManager(Fill $fill)
 {
     return ['type' => $fill->getType(), 'color' => ['rgb' => $fill->getColor()]];
 }