Code Duplication    Length = 9-11 lines in 3 locations

tests/Unit/Http/Controllers/BaseControllerTest.php 1 location

@@ 35-45 (lines=11) @@
32
  /**
33
   * @covers \Tfboe\FmLib\Http\Controllers\BaseController::__construct
34
   */
35
  public function testConstruct()
36
  {
37
    $entityManager = $this->createMock(EntityManagerInterface::class);
38
    $controller = $this->getMockForAbstractClass(BaseController::class, [
39
      $entityManager
40
    ]);
41
    self::assertInstanceOf(BaseController::class, $controller);
42
    /** @noinspection PhpUnhandledExceptionInspection */
43
    self::assertEquals($entityManager, self::getProperty(get_class($controller), 'entityManager')
44
      ->getValue($controller));
45
  }
46
47
  /**
48
   * @covers \Tfboe\FmLib\Http\Controllers\BaseController::datetimetzTransformer()

tests/Unit/Service/DynamicServiceLoadingServiceTest.php 1 location

@@ 28-36 (lines=9) @@
25
  /**
26
   * @covers \Tfboe\FmLib\Service\DynamicServiceLoadingService::__construct
27
   */
28
  public function testConstruct()
29
  {
30
    $app = $this->getMockForAbstractClass(Container::class);
31
    /** @var Container $app */
32
    $entity = new DynamicServiceLoadingService($app);
33
    self::assertInstanceOf(DynamicServiceLoadingService::class, $entity);
34
    /** @noinspection PhpUnhandledExceptionInspection */
35
    self::assertEquals($app, self::getProperty(get_class($entity), 'app')->getValue($entity));
36
  }
37
38
39
  /**

tests/Unit/Service/LoadingServiceTest.php 1 location

@@ 34-42 (lines=9) @@
31
  /**
32
   * @covers \Tfboe\FmLib\Service\LoadingService::__construct
33
   */
34
  public function testConstruct()
35
  {
36
    /** @var EntityManagerInterface $entityManager */
37
    $entityManager = $this->getMockForAbstractClass(EntityManagerInterface::class);
38
    $service = new LoadingService($entityManager);
39
    self::assertInstanceOf(LoadingService::class, $service);
40
    /** @noinspection PhpUnhandledExceptionInspection */
41
    self::assertEquals($entityManager, self::getProperty(get_class($service), 'em')->getValue($service));
42
  }
43
44
  /**
45
   * @covers \Tfboe\FmLib\Service\LoadingService::loadEntities