Added unit test for Twig extension can method