public function test_can_resolve_with_in_memory_database() { $this->config->shouldReceive('get')->with('database.connections.sqlite.database')->times(2)->andReturn(':memory'); $this->config->shouldReceive('get')->with('database.connections.sqlite.username')->once()->andReturn('username'); $this->config->shouldReceive('get')->with('database.connections.sqlite.password')->once()->andReturn('password'); $this->config->shouldReceive('get')->with('database.connections.sqlite.prefix')->once()->andReturn('prefix'); $resolved = $this->connection->resolve(); $this->assertEquals('pdo_sqlite', $resolved['driver']); $this->assertEquals('username', $resolved['user']); $this->assertEquals('password', $resolved['password']); $this->assertEquals('prefix', $resolved['prefix']); $this->assertTrue($resolved['memory']); $this->assertNull($resolved['path']); }
public function test_can_resolve_with_full_in__memory_database() { $resolved = $this->connection->resolve(['database' => ':memory:']); $this->assertTrue($resolved['memory']); $this->assertEquals(':memory:', $resolved['path']); }