If getActionName() returns string, string must be checked: $this->assertEquals('grid', $oAction->getListType() )