createModelWithFixturePath(); $this->assertEquals(['en', 'ru'], $this->callProtected($model, 'getFilesNames')); } public function testValidateValueSupportedLanguage() { $model = $this->createModelWithFixturePath(); $this->assertNull($this->callProtected($model, 'validateValue', 'ru')); } public function testValidateNotSupportedLanguage() { $model = $this->createModelWithFixturePath(); $this->assertEquals([$model->message, []], $this->callProtected($model, 'validateValue', 'by')); } /** * @return LanguageValidator */ private function createModelWithFixturePath() { return new class extends LanguageValidator { public function getFolderPath() { return __DIR__ . '/../fixtures/data/i18n'; } }; } }