public function setUp() { $this->pdo = new \PDO("mysql:host=127.0.0.1;dbname=tests", 'root', ''); $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $this->pdo->exec('SET NAMES utf8'); /** * Table cars; SQLCommand */ $table = new CarTable($this->pdo); $this->carsSqlCommand = new SQLCommand($table->getTableName(), CarEntity::getColumns()); }
/** * @covers ::getTableName */ public function testGetTableName() { $carTable = new CarTable($this->pdo); $this->assertSame('cars', $carTable->getTableName()); }