DboSource::getVersion PHP Method

getVersion() public method

Gets the version string of the database server
public getVersion ( ) : string
return string The database version
    public function getVersion()
    {
        return $this->_connection->getAttribute(PDO::ATTR_SERVER_VERSION);
    }

Usage Example

 /**
  * Tests that getVersion method sends the correct query for getting the mysql version
  * @return void
  */
 public function testGetVersion()
 {
     $version = $this->Dbo->getVersion();
     $this->assertTrue(is_string($version));
 }
DboSource