|
@@ 133-149 (lines=17) @@
|
| 130 |
|
$this->assertSame('f', $result['gender']); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
public function testGuesserWithMetaPhone() |
| 134 |
|
{ |
| 135 |
|
$females = array(); |
| 136 |
|
$males = array(); |
| 137 |
|
$matchList = array('one_only_metaphone'); |
| 138 |
|
|
| 139 |
|
// use with extra names supplied via constructor |
| 140 |
|
$guesser = new AzineGenderGuesser($females, $males, true, $matchList); |
| 141 |
|
|
| 142 |
|
$result = $guesser->guess('Patric'); |
| 143 |
|
$this->assertSame('m', $result['gender']); |
| 144 |
|
$result = $guesser->guess('Tomàs'); |
| 145 |
|
$this->assertSame('m', $result['gender']); |
| 146 |
|
|
| 147 |
|
$result = $guesser->guess('Sonja'); |
| 148 |
|
$this->assertSame('f', $result['gender']); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
public function testGuesserWithMetaPhone2() |
| 152 |
|
{ |
|
@@ 151-167 (lines=17) @@
|
| 148 |
|
$this->assertSame('f', $result['gender']); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
public function testGuesserWithMetaPhone2() |
| 152 |
|
{ |
| 153 |
|
$females = array(); |
| 154 |
|
$males = array(); |
| 155 |
|
$matchList = array('either_weight_metaphone'); |
| 156 |
|
|
| 157 |
|
// use with extra names supplied via constructor |
| 158 |
|
$guesser = new AzineGenderGuesser($females, $males, true, $matchList); |
| 159 |
|
|
| 160 |
|
$result = $guesser->guess('Patric'); |
| 161 |
|
$this->assertSame('m', $result['gender']); |
| 162 |
|
$result = $guesser->guess('Tomàs'); |
| 163 |
|
$this->assertSame('m', $result['gender']); |
| 164 |
|
|
| 165 |
|
$result = $guesser->guess('Sonja'); |
| 166 |
|
$this->assertSame('f', $result['gender']); |
| 167 |
|
} |
| 168 |
|
} |
| 169 |
|
|