mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-02-22 04:58:38 +00:00
18 lines
635 B
PHP
18 lines
635 B
PHP
<?php
|
|
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
|
|
class ControllerFactoryTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
public function testgetController()
|
|
{
|
|
//execute the method with invalid input
|
|
$controller = ControllerFactory::getController('');
|
|
$this->assertInstanceOf('SugarController', $controller);
|
|
|
|
//execute the method with valid input and check if it returns correct instance
|
|
$controller = ControllerFactory::getController('Users');
|
|
$this->assertInstanceOf('UsersController', $controller);
|
|
$this->assertInstanceOf('SugarController', $controller);
|
|
}
|
|
}
|