assertEquals(Bullet::TYPE_NONE, $object->getBulletType()); $this->assertEquals('Calibri', $object->getBulletFont()); $this->assertEquals('-', $object->getBulletChar()); $this->assertEquals(Bullet::NUMERIC_DEFAULT, $object->getBulletNumericStyle()); $this->assertEquals(1, $object->getBulletNumericStartAt()); } /** * Test get/set bullet char */ public function testSetGetBulletChar() { $object = new Bullet(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletChar()); $this->assertEquals('-', $object->getBulletChar()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletChar('a')); $this->assertEquals('a', $object->getBulletChar()); } /** * Test get/set bullet color */ public function testSetGetBulletColor() { $object = new Bullet(); $expectedARGB = '01234567'; // default $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Color', $object->getBulletColor()); $this->assertEquals(Color::COLOR_BLACK, $object->getBulletColor()->getARGB()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletColor(new Color($expectedARGB))); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Color', $object->getBulletColor()); $this->assertEquals($expectedARGB, $object->getBulletColor()->getARGB()); } /** * Test get/set bullet font */ public function testSetGetBulletFont() { $object = new Bullet(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont()); $this->assertEquals('Calibri', $object->getBulletFont()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont('')); $this->assertEquals('Calibri', $object->getBulletFont()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletFont('Arial')); $this->assertEquals('Arial', $object->getBulletFont()); } /** * Test get/set bullet numeric start at */ public function testSetGetBulletNumericStartAt() { $object = new Bullet(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletNumericStartAt()); $this->assertEquals(1, $object->getBulletNumericStartAt()); $value = rand(1, 100); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletNumericStartAt($value)); $this->assertEquals($value, $object->getBulletNumericStartAt()); } /** * Test get/set bullet numeric style */ public function testSetGetBulletNumericStyle() { $object = new Bullet(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletNumericStyle()); $this->assertEquals(Bullet::NUMERIC_DEFAULT, $object->getBulletNumericStyle()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletNumericStyle(Bullet::NUMERIC_ALPHALCPARENBOTH)); $this->assertEquals(Bullet::NUMERIC_ALPHALCPARENBOTH, $object->getBulletNumericStyle()); } /** * Test get/set bullet type */ public function testSetGetBulletType() { $object = new Bullet(); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletType()); $this->assertEquals(Bullet::TYPE_NONE, $object->getBulletType()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Bullet', $object->setBulletType(Bullet::TYPE_BULLET)); $this->assertEquals(Bullet::TYPE_BULLET, $object->getBulletType()); } /** * Test get/set has index */ public function testSetGetHashIndex() { $object = new Bullet(); $value = rand(1, 100); $object->setHashIndex($value); $this->assertEquals($value, $object->getHashIndex()); } }