/**
  * @test
  */
 public function not_see_twitter_info_on_profile_page()
 {
     $this->markTestSkipped("Gotta get this one working");
     $user_id = Rhumsaa\Uuid\Uuid::uuid4()->toString();
     $user = factory(\App\User::class)->create(['id' => $user_id, 'is_admin' => 1, 'twitter' => 'footwitter']);
     $this->actingAs($user);
     factory(\AlfredNutileInc\LaravelFeatureFlags\FeatureFlag::class)->create(['key' => 'see-twitter-field', 'variants' => '{ "users": [ "not_you" ]}']);
     $this->get('/profile/' . $user_id)->dontSee('Twitter Name');
     $response = $this->call('GET', '/profile/' . $user_id);
     $this->assertEquals(200, $response->status());
 }
Ejemplo n.º 2
0
 public function create($data = array())
 {
     return $this->mockTrackingCode = (string) Rhumsaa\Uuid\Uuid::uuid1();
 }
Ejemplo n.º 3
0
    $x = uuid_create(UUID_TYPE_RANDOM);
}
$results['pecl'] = $watch->stop('pecl');
/**
 * Using the older Rhumsaa\Uuid version of the library
 */
$watch->start('rhumsaa-openssl');
for ($i = 0; $i < ITERATIONS; ++$i) {
    $x = (string) \Rhumsaa\Uuid\Uuid::uuid4();
}
$results['rhumsaa-openssl'] = $watch->stop('rhumsaa-openssl');
/**
 * Using the older Rhumsaa\Uuid version of the library without OpenSSL
 */
$watch->start('rhumsaa-mtrand');
\Rhumsaa\Uuid\Uuid::$forceNoOpensslRandomPseudoBytes = true;
for ($i = 0; $i < ITERATIONS; ++$i) {
    $x = (string) \Rhumsaa\Uuid\Uuid::uuid4();
}
$results['rhumsaa-mtrand'] = $watch->stop('rhumsaa-mtrand');
/**
 * Using Ramsey\Uuid with PHP 7 random_bytes()
 */
if (PHP_MAJOR_VERSION >= 7) {
    $watch->start('ramsey-php7');
    $uuidFactory = new \Ramsey\Uuid\UuidFactory();
    $uuidFactory->setRandomGenerator(new \Ramsey\Uuid\Generator\RandomBytesGenerator());
    \Ramsey\Uuid\Uuid::setFactory($uuidFactory);
    for ($i = 0; $i < ITERATIONS; ++$i) {
        $x = (string) \Ramsey\Uuid\Uuid::uuid4();
    }