Esempio n. 1
0
 public function testDefaultConstructor()
 {
     $color = new Color();
     $this->assertSame(Fonts::KEEP, $color->getFont());
     $this->assertSame(Backgrounds::KEEP, $color->getBackground());
     $this->assertSame(Flags::NONE, $color->getFlags());
     $this->assertSame(array(), $color->getStyles());
     $this->assertSame("", (string) $color);
 }
Esempio n. 2
0
 public function testUnsetStyle()
 {
     $this->object->setStyles(Styles::BOLD, true);
     $this->assertSame(true, $this->object->getStyles(Styles::BOLD));
     $this->assertSame(array(Styles::BOLD => true), $this->object->getStyles());
     $this->object->setStyles(Styles::BOLD, null);
     $this->assertSame(null, $this->object->getStyles(Styles::BOLD));
     $this->assertSame(array(), $this->object->getStyles());
 }