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