public function switchToMaster() { $connection = $this->getConnectionByRole('master'); $this->switchTo($connection); }