Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit c2b0253

Browse files
authored
Merge pull request #2045 from sanmon1985/patch-1
Fix letter 'a' in female lastname generation (ru_RU)
2 parents 0ce5bd6 + 3a572e3 commit c2b0253

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/Faker/Provider/ru_RU/Person.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Person extends \Faker\Provider\Person
105105
'Меркушев', 'Лыткин', 'Туров',
106106
);
107107

108-
protected static $lastNameSuffix = array('a', '');
108+
protected static $lastNameSuffix = array('а', '');
109109

110110
/**
111111
* Return male middle name
@@ -169,7 +169,7 @@ public function lastName($gender = null)
169169
$lastName = static::randomElement(static::$lastName);
170170

171171
if (static::GENDER_FEMALE === $gender) {
172-
return $lastName . 'a';
172+
return $lastName . 'а';
173173
} elseif (static::GENDER_MALE === $gender) {
174174
return $lastName;
175175
}

Diff for: test/Faker/Provider/ru_RU/PersonTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ protected function setUp()
2222

2323
public function testLastNameFemale()
2424
{
25-
$this->assertEquals("a", substr($this->faker->lastName('female'), -1));
25+
$this->assertEquals("а", substr($this->faker->lastName('female'), -2, 2));
2626
}
2727

2828
public function testLastNameMale()
2929
{
30-
$this->assertNotEquals("a", substr($this->faker->lastName('male'), -1));
30+
$this->assertNotEquals("а", substr($this->faker->lastName('male'), -2, 2));
3131
}
3232

3333
public function testLastNameRandom()

0 commit comments

Comments
 (0)