示例#1
0
 public function testParameterReplacing()
 {
     $command = new Command();
     $command->sql = 'SELECT * FROM simple_table WHERE id = :id';
     $command->bind(':id', 2);
     $connection = ConnectionFactory::createConnection();
     $query = $command->getPreparedQuery($connection);
     $this->assertStringEqualsIgnoreSpacing('SELECT * FROM simple_table WHERE id = 2', $query);
 }