public function testGetTypes2() { try { //Try to get all resource sets with non of the resouce sets are visible $configuration = null; $metadataProvider = $this->_createMetadataAndConfiguration2($configuration); $metaQueryProverWrapper = new MetadataQueryProviderWrapper($metadataProvider, null, $configuration, false); $exceptionThrown = false; try { $metaQueryProverWrapper->getTypes(); } catch (ODataException $exception) { $exceptionThrown = true; $this->assertEquals($exception->getMessage(), 'More than one entity type with the name \'Order\' was found. Entity type names must be unique.'); } if (!$exceptionThrown) { $this->fail('An expected ODataException for entity type name repetition has not been thrown'); } } catch (\Exception $exception) { $this->fail('An unexpected Exception has been raised' . $exception->getMessage()); } }