/** * @expectedException Foolz\SphinxQL\Exception\DatabaseException */ public function testQueryThrowsException() { $this->connection->query('SHOW METAL'); }
public function testCreateFunction() { Helper::create($this->conn)->createFunction('my_udf', 'INT', 'test_udf.so')->execute(); $this->assertSame(array(array('MY_UDF()' => '42')), $this->conn->query('SELECT MY_UDF()')->getStored()); Helper::create($this->conn)->dropFunction('my_udf')->execute(); }