Armor Stand name is set but not detected by /testfor

Your problem isn't that it won't detect the name, but that the armor stand doesn't have the name. Use {CustomName:"player"} instead of {name:player} when summoning the armor stand and your problem should be fixed.