Beispiel #1
0
 public function test_cant_extend_with_an_invalid_class()
 {
     $this->registry->shouldReceive('getManager')->once()->with('default')->andReturn($this->em);
     $this->container->shouldReceive('make')->once()->with(InvalidDoctrineExtender::class)->andReturn(new InvalidDoctrineExtender());
     $this->setExpectedException(InvalidArgumentException::class);
     $this->manager->extend('default', InvalidDoctrineExtender::class);
 }
Beispiel #2
0
 /**
  * 
  *
  * @param string $connection
  * @param string|callable $callback
  * @static 
  */
 public static function extend($connection, $callback)
 {
     return \LaravelDoctrine\ORM\DoctrineManager::extend($connection, $callback);
 }