/** * Test the searchFor() method with a non numeric value. * * @return void */ public function testSearchForWithNonNumeric() { $decimal = new Numeric($this->mockMetaModel('en', 'en', $this->mockDatabase()), array('colname' => 'test')); $this->assertEquals(array(), $decimal->searchFor('abc')); }
/** * {@inheritdoc} */ public function getFilterOptions($idList, $usedOnly, &$arrCount = null) { $dispatcher = $this->getMetaModel()->getServiceContainer()->getEventDispatcher(); $format = $this->getDateTimeFormatString(); return array_map(function ($value) use($format, $dispatcher) { $event = new ParseDateEvent($value, $format); $dispatcher->dispatch(ContaoEvents::DATE_PARSE, $event); return $event->getResult(); }, parent::getFilterOptions($idList, $usedOnly, $arrCount)); }