/** * Initializes the Mail_Queue in {@link self::$queue}. * * @return void * @uses MDB2_Driver_SQLite */ public function setUp() { if (!extension_loaded('sqlite')) { $this->markTestSkipped("You need ext/sqlite to run this test suite."); return; } $this->dsn = 'sqlite:///' . __DIR__ . "/{$this->db}?mode=0644"; $this->setUpDatabase($this->dsn); $container_opts = array('type' => 'mdb2', 'dsn' => $this->dsn, 'mail_table' => $this->table); /** * @see Mail_mock */ $mail_opts = array('driver' => 'mock'); $this->queue = new Mail_Queue($container_opts, $mail_opts); if ($this->queue->hasErrors()) { $errors = $this->queue->getErrors(); $fail = "The following errors occurred:\n"; foreach ($errors as $error) { $fail .= $error->getMessage() . "\n"; } $this->fail($fail); } }