]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/modules/ModuleBuilder/views/ViewListVIewTest.php
Added unit tests.
[Github/sugarcrm.git] / tests / modules / ModuleBuilder / views / ViewListVIewTest.php
1 <?php
2
3 require_once("modules/ModuleBuilder/views/view.listview.php");
4
5 class ViewListViewTest extends Sugar_PHPUnit_Framework_TestCase
6 {
7         
8         public function setUp() 
9     {
10             global $app_list_strings;
11         include("include/language/en_us.lang.php");
12     }
13     
14     public function tearDown() 
15     {
16         $_REQUEST = array();
17     }
18
19     /**
20      * Simple test that the list view class will not throw errors when used.
21      * (Bug 42036)
22      */
23     public function testConstructor()
24     {
25         $_REQUEST = array(
26             "to_pdf" => "1",
27             "sugar_body_only"=>"1",
28             "module"=>"ModuleBuilder",
29             "view_package"=>"",
30             "view_module"=>"KBDocuments",
31             "view"=>"listview",
32         );
33         $view = new ViewListView();
34         $ajax = $view->constructAjax();
35         $this->assertNotNull($ajax);
36     }
37     
38 }