Skip to content

Commit

Permalink
Make fake emails use free email domains from time to time
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Apr 14, 2012
1 parent b5859dc commit bc9fb65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
email // '[email protected]'
safeEmail // '[email protected]'
freeEmail // '[email protected]'
companyEmail // '[email protected]'
freeEmailDomain // 'yahoo.com'
userName // 'wade55'
domainName // 'wolffdeckow.net'
Expand Down
9 changes: 9 additions & 0 deletions src/Faker/Provider/Internet.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Internet extends \Faker\Provider\Base
);
protected static $emailFormats = array(
'{{userName}}@{{domainName}}',
'{{userName}}@{{freeEmailDomain}}',
);
protected static $urlFormats = array(
'http://www.{{domainName}}/',
Expand Down Expand Up @@ -47,6 +48,14 @@ public function freeEmail()
return $this->userName() . '@' . static::freeEmailDomain();
}

/**
* @example '[email protected]'
*/
public function companyEmail()
{
return $this->userName() . '@' . $this->domainName();
}

/**
* @example 'gmail.com'
*/
Expand Down

0 comments on commit bc9fb65

Please sign in to comment.