private function getCloudLocationEntity($id = null, $cloudLocation = self::CL_NAME) { //Create test cloud location $cl = new CloudLocation(); $cl->cloudLocationId = $id ?: self::CL_LOC_ID; //Platform,url,cloudLocation is unique key $cl->platform = self::CL_PLATFORM; $cl->url = self::CL_URL; $cl->cloudLocation = self::CL_NAME; return $cl; }