-# Auto detect text files and perform LF normalization
-* text=auto
+# Use Linux/Uni* line-feed for new lines (prevents converting)
+* text=lf
// First get a UserRegistration instance
$managerInstance = ManagerFactory::createManagerByType('city');
+ // Make sure the instance is valid
+ assert($managerInstance instanceof ManageableCity);
+
// First set request and response instance
$managerInstance->setRequestInstance($requestInstance);
$managerInstance->setResponseInstance($responseInstance);
// Get city manager instance
$managerInstance = ManagerFactory::createManagerByType('city');
+ // Make sure the manager instance is valid
+ assert($managerInstance instanceof ManageableCity);
+
// Set result instance
$managerInstance->setResultInstance($resultInstance);
// Get manger instance
$managerInstance = ManagerFactory::createManagerByType('city');
+ // Make sure the instance is valid
+ assert($managerInstance instanceof ManageableCity);
+
// Set result instance
$managerInstance->setResultInstance($resultInstance);
// Get region manager instance
$managerInstance = ManagerFactory::createManagerByType('region');
+ // Make sure the instance is valid
+ assert($managerInstance instanceof ManageableRegion);
+
// Set result instance
$managerInstance->setResultInstance($resultInstance);
// Get manger instance
$managerInstance = ManagerFactory::createManagerByType('region');
+ // Make sure the instance is valid
+ assert($managerInstance instanceof ManageableRegion);
+
// Set result instance
$managerInstance->setResultInstance($resultInstance);
// Get a new instance
$managerInstance = ManagerFactory::createManagerByType('city');
+ // Make sure the instance is valid
+ assert($managerInstance instanceof ManageableCity);
+
// Does the city name exist?
$alreadyTaken = ($managerInstance->ifCityNameExists($cityName));
// Get region manager
$managerInstance = ManagerFactory::createManagerByType('region');
- // There should be no region created
+ // The manager instance should be valid and no region should be created
+ assert($managerInstance instanceof ManageableRegion);
assert(!$managerInstance->ifUserHasCreatedRegion());
// Create first region and get back whole result