Exemple #1
0
 public function run()
 {
     Eloquent::unguard();
     DB::table('users')->truncate();
     User::create(array('firstname' => 'Kevin', 'lastname' => 'Wennemuth', 'username' => 'feffi', 'email' => 'feffi@feffi.org', 'password' => Hash::make('test')));
     User::create(array('firstname' => 'John', 'lastname' => 'Tester', 'username' => 'john', 'email' => 'john@feffi.org', 'password' => Hash::make('john')));
 }
Exemple #2
0
 /**
  * @test
  * @large
  */
 public function testHasTracks()
 {
     $user = User::find(2);
     $this->assertTrue($user->hasTracks(array(1, 2)));
     $this->assertFalse($user->hasTracks(array(3)));
     $this->assertFalse($user->hasTracks(array(1, 3)));
     $this->assertFalse($user->hasTracks(array(2, 3)));
     $this->assertFalse($user->hasTracks(array(1, 2, 3)));
     $this->assertFalse($user->hasTracks(array()));
 }