Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
<?php
namespace Faker\Test\Provider;
use Faker\Generator;
use Faker\Calculator\Luhn;
use Faker\Provider\PhoneNumber;
use PHPUnit\Framework\TestCase;
class PhoneNumberTest extends TestCase
{
/**
* @var Generator
*/
private $faker;
public function setUp()
{
$faker = new Generator();
$faker->addProvider(new PhoneNumber($faker));
$this->faker = $faker;
}
public function testPhoneNumberFormat()
{
$number = $this->faker->e164PhoneNumber();
$this->assertRegExp('/^\+[0-9]{11,}$/', $number);
}
public function testImeiReturnsValidNumber()
{
$imei = $this->faker->imei();
$this->assertTrue(Luhn::isValid($imei));
}
}