PHP code example of icanhazstring / phpunit-seed
1. Go to this page and download the library: Download icanhazstring/phpunit-seed library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
icanhazstring / phpunit-seed example snippets
class SuperTest extends PHPUnitSeed\Framework\Testcase
{
public function testAwesome()
{
$name = $this->fake()->name();
$this->assertEquals($name, $this->fake()->name());
// should work
}
}
class MyTestCase extends PHPUnitSeed\Framework\Testcase
{
protected static FAKE_LOCALE = 'de_DE';
public function itShouldTestWithDELocale()
{
$name = $this->fake()->name; // will be name from de_DE provider
}
}
class MyTestCase extends PHPUnitSeed\Framework\Testcase
{
public function itShouldTestWithDELocale()
{
$name = $this->fake('de_DE')->name; // will be name from de_DE provider
}
}