public function setUp() { $config = (require '../../Controller/Component/db_config.php'); $conn = new MySql($config); TRW\ActiveRecord\BaseRecord::setConnection($conn); $conn->query("DELETE FROM users"); $conn->query("INSERT INTO users(id, name) VALUES\n\t\t\t(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four'), (5, 'five')"); }
public static function setUpBeforeClass() { $config = (require '../config.php'); self::$connection = new MySql($config['Database']['MySql']); TRW\ActiveRecord\BaseRecord::setConnection(self::$connection); }