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

Commit

Permalink
Add Internet Format for ja_JP.
Browse files Browse the repository at this point in the history
  • Loading branch information
itigoppo committed Jul 28, 2017
1 parent ea4244d commit 1009b17
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
37 changes: 35 additions & 2 deletions src/Faker/Provider/ja_JP/Internet.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,44 @@ class Internet extends \Faker\Provider\Internet
'com', 'com', 'com', 'biz', 'info', 'net', 'org', 'jp', 'jp', 'jp',
);

/**
* {@link} http://dic.nicovideo.jp/a/%E6%97%A5%E6%9C%AC%E3%81%AE%E8%8B%97%E5%AD%97%28%E5%90%8D%E5%AD%97%29%E3%81%AE%E4%B8%80%E8%A6%A7
*/
protected static $lastNameAscii = array(
'uno', 'kudo', 'suzuki', 'tanabe', 'nagisa', 'hirokawa', 'yoshimoto'
'aota', 'aoyama', 'ishida', 'idaka', 'ito', 'uno', 'ekoda', 'ogaki',
'kato', 'kanou', 'kijima', 'kimura', 'kiriyama', 'kudo', 'koizumi', 'kobayashi', 'kondo',
'saito', 'sakamoto', 'sasaki', 'sato', 'sasada', 'suzuki', 'sugiyama',
'takahashi', 'tanaka', 'tanabe', 'tsuda',
'nakajima', 'nakamura', 'nagisa', 'nakatsugawa', 'nishinosono', 'nomura',
'harada', 'hamada', 'hirokawa', 'fujimoto',
'matsumoto', 'miyake', 'miyazawa', 'murayama',
'yamagishi', 'yamaguchi', 'yamada', 'yamamoto', 'yoshida', 'yoshimoto',
'wakamatsu', 'watanabe',
);

/**
* {@link} http://dic.nicovideo.jp/a/%E6%97%A5%E6%9C%AC%E4%BA%BA%E3%81%AE%E5%90%8D%E5%89%8D%E4%B8%80%E8%A6%A7
* {@link} http://www.meijiyasuda.co.jp/enjoy/ranking/
*/
protected static $firstNameAscii = array(
'akira', 'kana', 'taro', 'naoko', 'hiroshi', 'momoko', 'rika'
'akira', 'atsushi', 'osamu',
'akemi', 'asuka',
'kazuya', 'kyosuke', 'kenichi',
'kaori', 'kana', 'kumiko',
'shuhei', 'shota', 'jun', 'soutaro',
'sayuri', 'satomi',
'taichi', 'taro', 'takuma', 'tsubasa', 'tomoya',
'chiyo',
'naoki', 'naoto',
'naoko', 'nanami',
'hideki', 'hiroshi',
'hanako', 'haruka',
'manabu', 'mitsuru', 'minoru',
'maaya', 'mai', 'mikako', 'miki', 'momoko',
'yuki', 'yuta', 'yasuhiro', 'youichi', 'yosuke',
'yui', 'yumiko', 'yoko',
'ryosuke', 'ryohei', 'rei',
'rika',
);

public static function lastNameAscii()
Expand Down
27 changes: 27 additions & 0 deletions test/Faker/Provider/ja_JP/InternetTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Faker\Test\Provider\ja_JP;

use Faker\Generator;
use Faker\Provider\ja_JP\Internet;

class InternetTest extends \PHPUnit_Framework_TestCase
{
public function testUserName()
{
$faker = new Generator();
$faker->addProvider(new Internet($faker));
$faker->seed(1);

$this->assertEquals('akira72', $faker->userName);
}

public function testDomainName()
{
$faker = new Generator();
$faker->addProvider(new Internet($faker));
$faker->seed(1);

$this->assertEquals('nakajima.com', $faker->domainName);
}
}

0 comments on commit 1009b17

Please sign in to comment.