PHP Classes
elePHPant
Icontem

Fakerino: Generate fake names and other types of fake data

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (122)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-02-15 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 223 All time: 7,993 This week: 429Up
Version License PHP version Categories
fakerino 0.7.7MIT/X Consortium ...5.3.0PHP 5, Text processing, Testing
Description Author

This package can generate many kinds of fake data, support different languages, and automatic database seeding.

It is an extensive framework for generating fake data of several types for different purposes. Currently it can generate:

- Fake single data like for instance a name, surname, integer, text, etc..
- Fake complex data like for instance of a person: name, surname, hobby, country, etc.
- Fake data in different languages
- Fake regular expression data like for instance an url '/www.\w+.com/'
- Fake data for entering in a database table rows
- Fake Twig template string like for instance "Hello Mr {{ surname }}"
- Fake data to set to PHP object properties or using setter functions

It can output the generated fake data in JSON, array and string formats.

The configuration may be read from an array or file in the formats YAML, XML, PHP, text and INI.

  Performance   Level  
Name: Nicola Pietroluongo <contact>
Classes: 2 packages by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 3357146 in United Kingdom United Kingdom
Week rank: 688 Up23 in United Kingdom United Kingdom Up

Details

Fakerino

Fakerino is a fake data generator framework fully extensible.

Latest Stable Version Latest Unstable Version Travis Ci

SensioLabsInsight Code Climate Quality Score Code Coverage

License

Join the chat at https://gitter.im/Fakerino/Fakerino

Main features

  • Fake __complex data__ (e.g. person: name, surname, hobby, country, ... ).
  • Fake __single data__ (e.g. name, surname, integer, text, ...).
  • Fake data in __different languages__.
  • Fake __regular expression__ data (e.g. url => '/www\.\w+\.com/').
  • Fake data multiple times.
  • Fake a __database__ table row/s with one line of code.
  • Fake a __Twig__ string or file automatically (e.g. Hello Mr {{ surname }})
  • Fake a PHP __object/entity__ in one line of code (fills public properties and setters with fake data).
  • Support __JSON__, __array__ and string output.
  • Support array, __Yaml__, __XML__, __PHP__, __Txt__ and __Ini__ configurations.
  • Fake from __command line__ interface.

For more information about installation, features, support, contribution, or other, please read the __Fakerino docs__.

Installation

Use Composer to manage the dependencies of your project.

In your project folder run:

composer require fakerino/fakerino='~0.8'
vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data

Like a stand-alone project run:

composer create-project fakerino/fakerino fakerino

Quick start

<?php
require ('vendor/autoload.php'); 
use Fakerino\Fakerino;

$fakerino = Fakerino::create();
echo $fakerino->fake('Surname')->toJson(); //["Donovan"]
echo $fakerino->fake('nameFemale'); //Alice
echo $fakerino->fake('/www\.\w+\.com/'); //www.nikdjap.com
echo $fakerino->fake('nameMale')->num(3); //Bob Jack Rick
echo $fakerino->fake(array('nameMale', 'Surname'))->num(3)->toJson(); //[["Simon","Rodgers"],["Dean","Smith"],["Anthony","Bauman"]]

With a configuration you can __combine fake data__, or declare your __customs__.

$fakerino = Fakerino::create('./conf.php');
print_r($fakerino->fake('fakeChat')->toArray());
/* 
Array(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => Fake Rino <fakerino@fake.com>
                    [1] => 01 Jan 2015 14:14:42
                    [2] => Hi gentle developer!
                )
            [1] => Array
                (
                    [0] => Anonym Dev <anon@dev.com>
                    [1] => 01 Jan 2015 14:17:42
                    [2] => Hi Fakerino!
                )
        )
)*/

With Command line

app/fake -h //for help app/fake namemale surname //Travis Baldwin app/fake surname -j //["Brooks"] app/fake nameMale -n 2 //Nick Andy app/fake country -c path/config.ini //uses a config file app/fake surname -l de-DE //Schle├činger app/fake -s 'Hello Mrs {{namefemale}} {{surname}}' -l de-DE //Hello Mrs Seeliger Ceylin app/fake -t tableName -c path/confix.xml -n 10 //Inserts 10 fake rows into tableName

Third parties

Screenshots  
  • consoleCommandExample
  Files folder image Files  
File Role Description
Files folder imageapp (1 file)
Files folder imagebuild (1 file)
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file CHANGES.md Data Documentation
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENCE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  app  
File Role Description
  Accessible without login Plain text file fake Appl. Auxiliary data

  Files folder image Files  /  build  
File Role Description
  Accessible without login Plain text file ods Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageFakerino (1 file, 4 directories)

  Files folder image Files  /  src  /  Fakerino  
File Role Description
Files folder imageConfiguration (3 files, 2 directories)
Files folder imageCore (4 files, 7 directories)
Files folder imageDataSource (1 file, 1 directory)
Files folder imageFakeData (4 files, 4 directories)
  Plain text file Fakerino.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Configuration  
File Role Description
Files folder imageConfigurationFile (4 files, 1 directory)
Files folder imageException (3 files)
  Plain text file ConfigurationParserInterface.php Class Class source
  Plain text file FakerinoConf.php Class Class source
  Plain text file FakerinoConfigurationLoader.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Configuration  /  ConfigurationFile  
File Role Description
Files folder imageHelper (1 file)
  Plain text file IniConfigurationFile.php Class Class source
  Plain text file PhpConfigurationFile.php Class Class source
  Plain text file XmlConfigurationFile.php Class Class source
  Plain text file YmlConfigurationFile.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Configuration  /  ConfigurationFile  /  Helper  
File Role Description
  Plain text file FileConfigurationLoaderFactory.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Configuration  /  Exception  
File Role Description
  Plain text file ConfNotSupportedException.php Class Class source
  Plain text file ConfValueNotFoundException.php Class Class source
  Plain text file SourceNotValidException.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  
File Role Description
Files folder imageConsole (1 file)
Files folder imageDatabase (4 files)
Files folder imageEntity (4 files)
Files folder imageFakeHandler (8 files)
Files folder imageFiller (3 files)
Files folder imageRegEx (2 files, 1 directory)
Files folder imageTemplate (2 files)
  Plain text file FakeDataFactory.php Class Class source
  Plain text file FakeDataFactoryInterface.php Class Class source
  Plain text file FakeElement.php Class Class source
  Plain text file OutPutFactory.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  Console  
File Role Description
  Plain text file FakeConsole.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  Database  
File Role Description
  Plain text file DbFieldEntity.php Class Class source
  Plain text file DbInterface.php Class Class source
  Plain text file DbRowEntity.php Class Class source
  Plain text file DoctrineLayer.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  Entity  
File Role Description
  Plain text file ClassElement.php Class Class source
  Plain text file EntityInfo.php Class Class source
  Plain text file Method.php Class Class source
  Plain text file Property.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  FakeHandler  
File Role Description
  Plain text file ConfFakerClass.php Class Class source
  Plain text file CustomFakerClass.php Class Class source
  Plain text file DefaultFakerClass.php Class Class source
  Plain text file FakeHandler.php Class Class source
  Plain text file FileFakerClass.php Class Class source
  Plain text file Handler.php Class Class source
  Plain text file HandlerInterface.php Class Class source
  Plain text file RegExFakerClass.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  Filler  
File Role Description
  Plain text file DbFiller.php Class Class source
  Plain text file EntityFiller.php Class Class source
  Plain text file FillerInterface.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  RegEx  
File Role Description
Files folder imageException (1 file)
  Plain text file RegExGeneratorInterface.php Class Class source
  Plain text file RegRevGenerator.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  RegEx  /  Exception  
File Role Description
  Plain text file InvalidRegexException.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  Core  /  Template  
File Role Description
  Plain text file TemplateInterface.php Class Class source
  Plain text file TwigTemplate.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  DataSource  
File Role Description
Files folder imageFile (1 file, 1 directory)
  Plain text file FakeFileContainer.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  DataSource  /  File  
File Role Description
Files folder imageException (4 files)
  Plain text file File.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  DataSource  /  File  /  Exception  
File Role Description
  Plain text file FileEmptyException.php Class Class source
  Plain text file FileExceptionInterface.php Class Class source
  Plain text file FileLineNotFoundException.php Class Class source
  Plain text file FileNotFoundException.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  FakeData  
File Role Description
Files folder imageCore (2 files)
Files folder imageCustom (3 files)
Files folder imageException (2 files)
Files folder imageGenerator (5 files)
  Plain text file AbstractFakeData.php Class Class source
  Plain text file AbstractFakeDataGenerator.php Class Class source
  Plain text file FakeDataGeneratorInterface.php Class Class source
  Plain text file FakeDataInterface.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  FakeData  /  Core  
File Role Description
  Plain text file FileFake.php Class Class source
  Plain text file RegExFake.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  FakeData  /  Custom  
File Role Description
  Plain text file Date.php Class Class source
  Plain text file Integer.php Class Class source
  Plain text file Text.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  FakeData  /  Exception  
File Role Description
  Plain text file InvalidOptionException.php Class Class source
  Plain text file MissingRequiredOptionException.php Class Class source

  Files folder image Files  /  src  /  Fakerino  /  FakeData  /  Generator  
File Role Description
  Plain text file DateGenerator.php Class Class source
  Plain text file FileFakeGenerator.php Class Class source
  Plain text file IntegerGenerator.php Class Class source
  Plain text file RegExGenerator.php Class Class source
  Plain text file TextGenerator.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageFakerino (1 directory)

  Files folder image Files  /  tests  /  Fakerino  
File Role Description
Files folder imageTest (1 file, 5 directories)

  Files folder image Files  /  tests  /  Fakerino  /  Test  
File Role Description
Files folder imageConfiguration (2 files, 2 directories)
Files folder imageCore (1 file, 7 directories)
Files folder imageDataSource (1 file, 1 directory)
Files folder imageFakeData (1 file, 4 directories)
Files folder imageFixtures (11 files)
  Accessible without login Plain text file FakerinoTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Configuration  
File Role Description
Files folder imageConfigurationFile (4 files, 1 directory)
Files folder imageException (3 files)
  Plain text file FakerinoConfigurationLoaderTest.php Class Class source
  Accessible without login Plain text file FakerinoConfTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Configuration  /  ConfigurationFile  
File Role Description
Files folder imageHelper (1 file)
  Accessible without login Plain text file IniConfigurationFileTest.php Test Unit test script
  Accessible without login Plain text file PhpConfigurationFileTest.php Test Unit test script
  Accessible without login Plain text file XmlConfigurationFileTest.php Test Unit test script
  Plain text file YmlConfigurationFileTest.php Class Class source

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Configuration  /  ConfigurationFile  /  Helper  
File Role Description
  Accessible without login Plain text file FileConfigurationLoaderFactoryTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Configuration  /  Exception  
File Role Description
  Accessible without login Plain text file ConfNotSupportedExceptionTest.php Test Unit test script
  Accessible without login Plain text file ConfValueNotFoundExceptionTest.php Test Unit test script
  Accessible without login Plain text file SourceNotValidExceptionTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  
File Role Description
Files folder imageConsole (1 file)
Files folder imageDatabase (1 file)
Files folder imageEntity (1 file)
Files folder imageFakeHandler (6 files)
Files folder imageFiller (2 files)
Files folder imageRegEx (1 file, 1 directory)
Files folder imageTemplate (1 file)
  Accessible without login Plain text file FakeDataFactoryTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  Console  
File Role Description
  Accessible without login Plain text file FakeConsoleTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  Database  
File Role Description
  Accessible without login Plain text file DoctrineLayerTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  Entity  
File Role Description
  Accessible without login Plain text file EntityFillerTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  FakeHandler  
File Role Description
  Accessible without login Plain text file ConfFakerClassTest.php Test Unit test script
  Accessible without login Plain text file CustomFakerClassTest.php Test Unit test script
  Accessible without login Plain text file DefaultFakerClassTest.php Test Unit test script
  Accessible without login Plain text file FakeHandlerTest.php Test Unit test script
  Accessible without login Plain text file FileFakerClassTest.php Test Unit test script
  Accessible without login Plain text file RegExFakerClassTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  Filler  
File Role Description
  Accessible without login Plain text file DbFillerTest.php Test Unit test script
  Accessible without login Plain text file EntityFillerTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  RegEx  
File Role Description
Files folder imageException (1 file)
  Accessible without login Plain text file RegRevGeneratorTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  RegEx  /  Exception  
File Role Description
  Accessible without login Plain text file InvalidRegexExceptionTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Core  /  Template  
File Role Description
  Accessible without login Plain text file TwigTemplateTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  DataSource  
File Role Description
Files folder imageFile (1 file, 1 directory)
  Accessible without login Plain text file FakeFileContainerTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  DataSource  /  File  
File Role Description
Files folder imageException (1 file)
  Accessible without login Plain text file FileTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  DataSource  /  File  /  Exception  
File Role Description
  Accessible without login Plain text file FileExceptionsTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  FakeData  
File Role Description
Files folder imageCore (2 files)
Files folder imageCustom (3 files)
Files folder imageException (1 file)
Files folder imageGenerator (5 files)
  Accessible without login Plain text file AbstractFakeDataTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  FakeData  /  Core  
File Role Description
  Accessible without login Plain text file FileFakeTest.php Test Unit test script
  Accessible without login Plain text file RegExFakeTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  FakeData  /  Custom  
File Role Description
  Accessible without login Plain text file DateTest.php Test Unit test script
  Accessible without login Plain text file IntegerTest.php Test Unit test script
  Accessible without login Plain text file TextTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  FakeData  /  Exception  
File Role Description
  Accessible without login Plain text file FakeDataExceptionTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  FakeData  /  Generator  
File Role Description
  Accessible without login Plain text file DateGeneratorTest.php Test Unit test script
  Accessible without login Plain text file FileFakeGeneratorTest.php Test Unit test script
  Accessible without login Plain text file IntegerGeneratorTest.php Test Unit test script
  Accessible without login Plain text file RegExGeneratorTest.php Test Unit test script
  Accessible without login Plain text file TextGeneratorTest.php Test Unit test script

  Files folder image Files  /  tests  /  Fakerino  /  Test  /  Fixtures  
File Role Description
  Accessible without login Plain text file emptyFile.ini Data Auxiliary data
  Accessible without login Plain text file file.ini Data Auxiliary data
  Accessible without login Plain text file file.php Test Unit test script
  Accessible without login Plain text file file.txt Data Auxiliary data
  Accessible without login Plain text file file.xml Data Auxiliary data
  Accessible without login Plain text file file.xyz Data Auxiliary data
  Accessible without login Plain text file file.yml Data Auxiliary data
  Accessible without login Plain text file fileOneLine.yml Data Auxiliary data
  Accessible without login Plain text file fileWrongConf.php Test Unit test script
  Accessible without login HTML file template.html Data Auxiliary data
  Accessible without login Plain text file TestEntity.php Test Unit test script

 Version Control Unique User Downloads Download Rankings  
 99%
Total:223
This week:0
All time:7,993
This week:429Up