public function setUp() { $post = json_decode(file_get_contents(__DIR__ . '/data.json'), true); $this->v = Indie::withLocalization('en_US'); $this->v->import($post); }
public function testLocalization() { $v = Indie::withLocalization('ru_RU'); $v->import($this->post); $v->key('uuid[valid]')->with(new Rule\UUID('v4')); $v->key('uuid[notvalid]')->with(new Rule\UUID('v4')); $this->assertEquals('Значение \'string\' не является корректным UUID версии v4', $v->getErrors('uuid[notvalid]')[0], "Localization Failed"); }