本文整理汇总了PHP中Faker\Factory::randomDigit方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::randomDigit方法的具体用法?PHP Factory::randomDigit怎么用?PHP Factory::randomDigit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Faker\Factory
的用法示例。
在下文中一共展示了Factory::randomDigit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetTimeout
public function testGetTimeout()
{
$client = new Client();
$expectedTimeout = $this->faker->randomDigit();
$client->setTimeout($expectedTimeout);
$this->assertEquals($expectedTimeout, $client->getTimeout());
}
示例2: testGetClient
public function testGetClient()
{
$transport = new Guzzle();
$transport->setEndPoint($this->faker->url());
$transport->setTimeout($this->faker->randomDigit());
$client = $transport->getClient();
$this->assertTrue($client instanceof Client);
}
示例3: testGetEntity
public function testGetEntity()
{
$controller = new JsonApiController();
$meta = $this->getMockBuilder("Doctrine\\ORM\\Mapping\\ClassMetadata")->setConstructorArgs(["NwApi\\Entities\\User"])->getMock();
$di = Di::getInstance();
$di->em = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock();
$di->em->expects($this->any())->method('find')->willReturn(new NwApi\Entities\User());
$meta->identifier = ['id'];
$controller->getEntity($meta, [$this->faker->randomDigit()]);
}