/** * @test * * @covers Cocur\NQM\NQM::prepare() */ public function prepareShouldReturnPdoStatement() { $this->pdo->mock('SELECT * FROM table;', []); $this->queryLoader->shouldReceive('getQuery')->with('foo')->once()->andReturn('SELECT * FROM table;'); $stmt = $this->nqm->prepare('foo'); $this->assertInstanceOf('\\PDOStatement', $stmt); }