public function test_valueOf() { foreach (TextStyle::values() as $style) { $this->assertEquals(TextStyle::valueOf($style->name()), $style); } }
/** * Implements JsonSerializable::jsonSerialize(). */ public function jsonSerialize() { $valid = !isset($this->textAlignment) || $this->validateTextAlignment($this->textAlignment); if (!$valid) { return NULL; } return parent::jsonSerialize(); }