* @return Tx_Extbase_Persistence_Mapper_DataMap The data map
*/
public function buildDataMap($className) {
+ if (!class_exists($className)) {
+ throw new Tx_Extbase_Persistence_Exception_InvalidClass('Could not find class definition for name "' . $className . '". This could be caused by a mis-spelling of the class name in the class definition.');
+ }
+
$recordType = NULL;
$subclasses = array();
$tableName = strtolower($className);
$mockDataMapFactory->_callRef('setManyToManyRelation', $mockColumnMap, $leftColumnsDefinition['rights']);
}
+ /**
+ * @test
+ * @expectedException Tx_Extbase_Persistence_Exception_InvalidClass
+ */
+ public function buildDataMapThrowsExceptionIfClassNameIsNotKnown() {
+ $mockDataMapFactory = $this->getMock($this->buildAccessibleProxy('Tx_Extbase_Persistence_Mapper_DataMapFactory'), array('getControlSection'), array(), '', FALSE);
+ $mockDataMapFactory->buildDataMap('UnknownObject');
+ }
+
}
?>
\ No newline at end of file