Are engine casings expected to contain turbofan blade fragments?
We don't yet know how or why the engine casing failed to contain the fan blade on Southwest 1380.

But yes: Not only are the engines designed to contain blade failures at fan red-line speeds, but they are also required by 14 CFR 33.94 to confirm they do, typically via destructive "blade-off testing."
(There are a number of good videos of this testing online: Search "turbine blade fail test" or "blade-out engine test.")

As noted here "fan blade-out" failures in the real world are virtually unseen.  (Turbine blade failures are relatively common and can even go unnoticed until major service teardowns.)