mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-22 13:08:39 +00:00

- File: '... /install/performSetup.php' - Replaced 1 occurrence(s) of 'new Scheduler()' - Replaced 2 occurrence(s) of 'new User()' - Replaced 2 occurrence(s) of 'new Administration()' - File: '... /install/UserDemoData.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/data/SugarBeanTest.php' - Replaced 1 occurrence(s) of 'new Lead()' - Replaced 104 occurrence(s) of 'new Contact()' - Replaced 3 occurrence(s) of 'new EmailAddress()' - File: '... /tests/unit/phpunit/include/SubPanel/SubPanelTest.php' - Replaced 3 occurrence(s) of 'new Contact()' - Replaced 1 occurrence(s) of 'new Account()' - File: '... /tests/unit/phpunit/include/MVC/Controller/SugarControllerTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/SugarViewTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.listTest.php' - Replaced 5 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.htmlTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.detailTest.php' - Replaced 1 occurrence(s) of 'new Meeting()' - Replaced 3 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.editTest.php' - Replaced 1 occurrence(s) of 'new Meeting()' - Replaced 3 occurrence(s) of 'new User()'
35 lines
891 B
PHP
35 lines
891 B
PHP
<?php
|
|
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
|
|
class ViewHtmlTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
parent::setUp();
|
|
|
|
global $current_user;
|
|
get_sugar_config_defaults();
|
|
$current_user = BeanFactory::newBean('Users');
|
|
}
|
|
|
|
public function testViewHtml()
|
|
{
|
|
// Execute the constructor and check for the Object type
|
|
$view = new ViewHtml();
|
|
$this->assertInstanceOf('ViewHtml', $view);
|
|
$this->assertInstanceOf('SugarView', $view);
|
|
}
|
|
|
|
public function testdisplay()
|
|
{
|
|
$view = new ViewHtml();
|
|
|
|
// Execute the method and test that it works and doesn't throw an exception.
|
|
try {
|
|
$view->display();
|
|
} catch (Exception $e) {
|
|
$this->fail($e->getMessage() . "\nTrace:\n" . $e->getTraceAsString());
|
|
}
|
|
}
|
|
}
|