model = new \Magento\Framework\ObjectManager\Relations\Runtime(); } /** * @param $type * @param $parents * @dataProvider getParentsDataProvider */ public function testGetParents($type, $parents) { $this->assertEquals($parents, $this->model->getParents($type)); } /** * @return array */ public function getParentsDataProvider() { return [ [\Magento\Test\Di\DiInterface::class, []], [\Magento\Test\Di\DiParent::class, [null, \Magento\Test\Di\DiInterface::class]], [\Magento\Test\Di\Child::class, [\Magento\Test\Di\DiParent::class, \Magento\Test\Di\ChildInterface::class]] ]; } /** * @param $entity */ public function testHasIfNonExists() { $this->assertFalse($this->model->has(\NonexistentClass::class)); } }