Exemplo n.º 1
0
 public function testItBootsTheDatabaseOnGetDatabase()
 {
     $connection = m::mock('\\Illuminate\\Database\\Connection');
     $this->capsule->shouldReceive('connection')->times(3)->andReturn($connection);
     $this->databaseSchema->shouldReceive('initialize')->once();
     $connection->shouldReceive('statement')->times(3);
     $connection->shouldReceive('disconnect')->once();
     $actual = $this->databaseProxy->getConnection();
     $this->assertSame($connection, $actual);
 }
Exemplo n.º 2
0
 /**
  * @return \Illuminate\Database\Connection
  */
 protected function getDatabase()
 {
     return $this->databaseProxy->getConnection();
 }