/** * @return array|null */ protected function getDateParts() { if (is_null($this->datePartsChoices)) { $t = $this->translator; $this->datePartsChoices = array_map(function ($item) use($t) { return $t->trans($item); }, $this->dateModifiers->getDateParts()); } return $this->datePartsChoices; }
public function testDateParts() { $parts = $this->dateModifierProvider->getDateParts(); $this->assertNotEmpty($parts); $this->assertCount(9, $parts); }