This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
espocrm-base/tests/Espo/Utils/LayoutTest.php
T
Taras Machyshyn 417576fd5e change instance
2013-11-01 13:49:54 +02:00

42 lines
1017 B
PHP
Executable File

<?php
namespace Espo\Tests\Utils;
require_once('bootstrap.php');
use Espo\Utils as Utils;
class LayoutTest extends \PHPUnit_Framework_TestCase
{
protected $fixture;
protected function setUp()
{
$this->fixture = new Utils\Layout();
}
protected function tearDown()
{
$this->fixture = NULL;
}
function testGetConfig()
{
$this->assertObjectHasAttribute('corePath', $this->fixture->getConfig());
$this->assertObjectHasAttribute('customPath', $this->fixture->getConfig());
}
function testGetLayoutPath()
{
$this->assertEquals('application/Espo/Layouts/User', $this->fixture->getLayoutPath('User', '/'));
$this->assertEquals('application.Espo.Layouts.User', $this->fixture->getLayoutPath('User', '.'));
$this->assertEquals('application/Modules/Crm/Layouts/Account', $this->fixture->getLayoutPath('Account', '/'));
$this->assertEquals('application.Modules.Crm.Layouts.Account', $this->fixture->getLayoutPath('Account', '.'));
}
}
?>