public function case_is_identifier() { $this->given($_identifier = $this->realdom->regex('#^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$#'))->when(function () use($_identifier) { foreach ($this->sampleMany($_identifier, 1000) as $identifier) { $this->boolean(SUT::isIdentifier($identifier))->isTrue(); } }); }
public function case_uuid_all_differents() { $this->when(function () { $uuids = []; for ($i = 0; $i < 10000; ++$i) { $uuids[] = SUT::uuid(); } $this->integer(count($uuids))->isEqualTo(count(array_unique($uuids))); }); }