This is public in case the ORM should use a ready-instantiated
PDO object as its database connection. Accepts an optional string key
to identify the connection if multiple connections are used.
public function setUp() { // Enable logging ORM::configure('logging', true); // Set up the dummy database connection $db = new MockPDO('sqlite::memory:'); ORM::set_db($db); }
public function setUp() { // Set up the dummy database connections ORM::set_db(new MockPDO('sqlite::memory:')); ORM::set_db(new MockDifferentPDO('sqlite::memory:'), self::ALTERNATE); // Enable logging ORM::configure('logging', true); ORM::configure('logging', true, self::ALTERNATE); }
public function tearDown() { ORM::configure('logging', false); ORM::set_db(null); ORM::configure('id_column', 'id'); }