public function test_get_default_connection_name() { // Will return first, when no default name $this->container->shouldReceive('singleton')->once(); $this->registry->addConnection('custom'); $this->assertEquals('custom', $this->registry->getDefaultConnectionName()); // When default name, return default $this->container->shouldReceive('singleton')->once(); $this->registry->addConnection('default'); $this->assertEquals('default', $this->registry->getDefaultConnectionName()); }
/** * Gets the default connection name. * * @return string The default connection name. * @static */ public static function getDefaultConnectionName() { return \LaravelDoctrine\ORM\IlluminateRegistry::getDefaultConnectionName(); }