Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 /**
  * Gets the default connection name.
  *
  * @return string The default connection name.
  * @static 
  */
 public static function getDefaultConnectionName()
 {
     return \LaravelDoctrine\ORM\IlluminateRegistry::getDefaultConnectionName();
 }