| Total Lines | 35 | 
| Code Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 18 | public function testCreateRepository() : void | ||
| 19 |     { | ||
| 20 | $objectManager = $this->createMock(ObjectManager::class); | ||
| 21 | $objectFactory = $this->createMock(ObjectFactory::class); | ||
| 22 | $baseObjectRepositoryFactory = $this->createMock(BaseObjectRepositoryFactory::class); | ||
| 23 | $eventManager = $this->createMock(EventManager::class); | ||
| 24 | |||
| 25 | $objectRepositoryFactory = new ObjectRepositoryFactory( | ||
| 26 | $objectManager, | ||
| 27 | $objectFactory, | ||
| 28 | $baseObjectRepositoryFactory, | ||
| 29 | $eventManager | ||
| 30 | ); | ||
| 31 | |||
| 32 | $dataSource = new class() implements DataSource | ||
| 33 |         { | ||
| 34 | /** | ||
| 35 | * @return mixed[][] | ||
| 36 | */ | ||
| 37 | public function getSourceRows() : array | ||
| 38 |             { | ||
| 39 | return [ | ||
| 40 | ['username' => 'jwage'], | ||
| 41 | ]; | ||
| 42 | } | ||
| 43 | }; | ||
| 44 | |||
| 45 | $baseObjectRepositoryFactory->expects(self::once()) | ||
| 46 |             ->method('addObjectRepository') | ||
| 47 | ->with(stdClass::class); | ||
| 48 | |||
| 49 | $objectRepository = $objectRepositoryFactory->createRepository( | ||
|  | |||
| 50 | $dataSource, | ||
| 51 | TestRepository::class, | ||
| 52 | stdClass::class | ||
| 53 | ); | ||
| 56 |