/**
* Test of getViewName method, of class YiiUtils.
*/
@Test
public void testGetViewName() {
PhpClass phpClass = new PhpClass("SiteController", "SiteController");
phpClass.addMethod("actionIndex", "actionIndex");
for (PhpClass.Method method : phpClass.getMethods()) {
assertEquals("index", YiiUtils.getViewName(method));
}
phpClass = new PhpClass("SiteController", "SiteController");
phpClass.addMethod("actions", "actions");
for (PhpClass.Method method : phpClass.getMethods()) {
assertEquals(null, YiiUtils.getViewName(method));
}
}