/** * @covers \CSanquer\FakeryGenerator\Config\FakerConfig::getMethod * @dataProvider providerGetMethod */ public function testGetMethod($name, $expected) { $this->assertEquals($expected, $this->config->getMethod($name)); }
public function validateMethod(ExecutionContextInterface $context) { if ($this->fakerConfig && !in_array($this->getMethod(), array_keys($this->fakerConfig->getMethods()))) { $context->addViolationAt('method', 'This method \'{{ method }}\' is not available in Faker.', ['{{ method }}' => $this->getMethod()], null); } }
public function validateLocale(ExecutionContextInterface $context) { if ($this->fakerConfig && !in_array($this->getLocale(), $this->fakerConfig->getLocales())) { $context->addViolationAt('locale', 'This locale \'{{ locale }}\' is not available in Faker.', ['{{ locale }}' => $this->getLocale()], null); } }