Heat oil in a 2-quart saucepan; add onion and garlic and sauté until onion is tender.
Add tomatoes and simmer 10 minutes.
Combine beans, cooked macaroni, basil, salt and pepper.
Bring to a boil.
Serve hot. Garnish with Parmesan cheese.