/** * Create style tags for buttons * * @since 0.1.1 * * @acess protected * * @param $config * * @return string */ protected function make_style($config) { $color = helpers::get_color_from_meta($config); $background_color = helpers::get_background_color_from_meta($config); return sprintf('style="background-color:%s;color:%s;"', $background_color, $color); }
/** * Ensure our get color meta falls back to default with really bad input. * * @since 0.1.1 * * @covers \ingot\testing\utility\helpers::get_color_from_meta() * @covers \ingot\testing\utility\defaults::text_color() */ public function testColorMetaUnset() { $color = '#fff'; $a[rand()][rand()] = $color; $this->assertSame(\ingot\testing\utility\defaults::text_color(), \ingot\testing\utility\helpers::get_color_from_meta($a, false)); }