/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $Database = new \mysqli(TEST_DB_HOST, TEST_DB_USER, TEST_DB_PASSWORD, TEST_DB); $oPeriod = new Period($Database); $oPeriod->setPeriodType('monthly'); $this->object = new Data($Database, $oPeriod); $sSql = "DELETE FROM `dim_l1`"; $this->object->getDbConnection()->query($sSql); $sSql = "DELETE FROM `dim_l2`"; $this->object->getDbConnection()->query($sSql); $sSql = "DELETE FROM `dim_l3`"; $this->object->getDbConnection()->query($sSql); $sSql = "INSERT INTO `dim_table` (`id`, `table_name`) VALUES (" . self::TEST_TABLE_ID . ", 'test_table')"; $this->object->getDbConnection()->query($sSql); }