for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Mattbit\MysqlCompat\Bridge;
use Mattbit\MysqlCompat\Manager;
class BridgeTestCase extends FunctionalTestCase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* @var Bridge
*/
protected $bridge;
* @var \PDO
protected $db;
public function setUp()
$manager = new Manager(new \Mattbit\MysqlCompat\ConnectionFactory());
$this->bridge = new Bridge($manager);
$this->bridge->connect($this->config['dbhost'], $this->config['dbuser'], $this->config['dbpass']);
$this->bridge->selectDb($this->config['dbname']);
$this->loadFixtures();
}
protected function loadFixtures()
$dbname = $this->config['dbname'];
$dbhost = $this->config['dbhost'];
$dbuser = $this->config['dbuser'];
$dbpass = $this->config['dbpass'];
$this->db = new PDO("mysql:dbname=$dbname;host=$dbhost", $dbuser, $dbpass);
$sql = file_get_contents(__DIR__.'/fixtures.sql');
$this->db->query($sql);
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.