/** * @dataProvider getMaxAccessLevelDataProvider * * @param $accessLevel * @param $object * @param $expectedResult */ public function testGetMaxAccessLevel($accessLevel, $object, $expectedResult) { if ($object && $accessLevel === AccessLevel::SYSTEM_LEVEL) { $config = new Config(new EntityConfigId('ownership', 'SomeClass')); $config->set('owner_type', 'USER')->set('owner_field_name', 'test_field')->set('owner_column_name', 'test_column'); $this->configProvider->expects($this->once())->method('hasConfig')->with('SomeClass')->willReturn(true); $this->configProvider->expects($this->once())->method('getConfig')->with('SomeClass')->willReturn($config); } $this->entityClassResolver = null; $this->cache = null; $this->assertEquals($expectedResult, $this->provider->getMaxAccessLevel($accessLevel, $object)); }