/** * @depends testTextStyleConstructorValuesAssignment */ public function testToArrayWithTextStyleConfigObject() { $textStyle = new TextStyle(array('color' => 'blue', 'fontName' => 'Arial', 'fontSize' => 16)); $textStyleArr = $textStyle->toArray(); $this->assertTrue(is_array($textStyleArr)); $textStyleArrKeys = array_keys($textStyleArr); $this->assertEquals('textStyle', $textStyleArrKeys[0]); $this->assertTrue(is_array($textStyleArr['textStyle'])); $this->assertEquals('blue', $textStyleArr['textStyle']['color']); $this->assertEquals('Arial', $textStyleArr['textStyle']['fontName']); $this->assertEquals(16, $textStyleArr['textStyle']['fontSize']); }
/** * An object that specifies the title text style. create a new textStyle() * object, set the values then pass it to this function or to the constructor. * * @uses TextStyle * @param TextStyle $ts * @throws InvalidConfigValue * * @return Chart */ public function titleTextStyle(TextStyle $ts) { return $this->addOption($ts->toArray(__FUNCTION__)); }
/** * Sets the style for the month labels. * * @param TextStyle $label * * @return CalendarChart */ public function monthLabel(TextStyle $label) { $this->addCalendarOption($label->toArray(__FUNCTION__)); }