/** */ public function testUpdate() { $style1 = new FontStyle(); $style2 = new FontStyle(8, FontStyle::FONT_COURIER, FontStyle::FONT_STYLE_BOLD, FontStyle::HORIZONTAL_ALIGN_MIDDLE, FontStyle::VERTICAL_ALIGN_CENTRAL); $style1->update($style2); $this->assertSame(8, $style1->getSize()); $this->assertSame(FontStyle::FONT_COURIER, $style1->getName()); $this->assertSame(FontStyle::FONT_STYLE_BOLD, $style1->getStyle()); $this->assertSame(FontStyle::HORIZONTAL_ALIGN_MIDDLE, $style1->getHAlign()); $this->assertSame(FontStyle::VERTICAL_ALIGN_CENTRAL, $style1->getVAlign()); // test independence of style1 and style2 $style1->setSize(12); $this->assertSame(12, $style1->getSize()); $this->assertSame(8, $style2->getSize()); }