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

- File: '... /tests/unit/phpunit/include/MVC/View/views/view.quickTest.php' - Replaced 2 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.sugarpdfTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.ajaxTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.quickcreateTest.php' - Replaced 1 occurrence(s) of 'new Account()' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.multieditTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.popupTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.vcardTest.php' - Replaced 1 occurrence(s) of 'new Contact()' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.serializedTest.php' - Replaced 1 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.classicTest.php' - Replaced 2 occurrence(s) of 'new User()' - File: '... /tests/unit/phpunit/include/MVC/View/views/view.jsonTest.php' - Replaced 1 occurrence(s) of 'new User()'
51 lines
1.7 KiB
PHP
51 lines
1.7 KiB
PHP
<?php
|
|
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
|
|
class ViewMultieditTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
public function testViewMultiedit()
|
|
{
|
|
// Execute the constructor and check for the Object type and type attribute
|
|
$view = new ViewMultiedit();
|
|
$this->assertInstanceOf('ViewMultiedit', $view);
|
|
$this->assertInstanceOf('SugarView', $view);
|
|
$this->assertAttributeEquals('edit', 'type', $view);
|
|
}
|
|
|
|
public function testdisplay()
|
|
{
|
|
//test without action value and modules list in REQUEST object
|
|
$view = new ViewMultiedit();
|
|
ob_start();
|
|
$view->display();
|
|
$renderedContent = ob_get_contents();
|
|
ob_end_clean();
|
|
$this->assertEquals(0, strlen($renderedContent));
|
|
|
|
//test with valid action value to get link in return
|
|
$view = new ViewMultiedit();
|
|
$view->action = 'AjaxFormSave';
|
|
$view->module = 'Users';
|
|
$view->bean = BeanFactory::newBean('Users');
|
|
$view->bean->id = 1;
|
|
ob_start();
|
|
$view->display();
|
|
$renderedContent = ob_get_contents();
|
|
ob_end_clean();
|
|
$this->assertGreaterThan(0, strlen($renderedContent));
|
|
|
|
//Fails with a fatal error, method creates editview without properly setting it up causing fatal errors.
|
|
/*
|
|
//test only with modules list in REQUEST object
|
|
$view = new ViewMultiedit();
|
|
$GLOBALS['current_language']= 'en_us';
|
|
$_REQUEST['modules']= Array('Calls','Accounts');
|
|
ob_start();
|
|
$view->display();
|
|
$renderedContent = ob_get_contents();
|
|
ob_end_clean();
|
|
$this->assertGreaterThan(0,strlen($renderedContent));
|
|
*/
|
|
}
|
|
}
|