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/Core/Utils/File/ManagerTest.php
T
2014-01-24 13:49:08 +02:00

49 lines
953 B
PHP

<?php
namespace tests\Espo\Core\Utils\File;
class ManagerTest extends \PHPUnit_Framework_TestCase
{
protected $object;
protected $objects;
protected $filesPath= 'tests/testData/FileManager';
protected function setUp()
{
$this->object = new \Espo\Core\Utils\File\Manager(
(object) array(
'defaultPermissions' => (object) array (
'dir' => '0775',
'file' => '0664',
'user' => '',
'group' => '',
),
)
);
}
protected function tearDown()
{
$this->object = NULL;
}
function testGetFileName()
{
$this->assertEquals('Donwload', $this->object->getFileName('Donwload.php'));
$this->assertEquals('Donwload', $this->object->getFileName('/Donwload.php'));
$this->assertEquals('Donwload', $this->object->getFileName('\Donwload.php'));
$this->assertEquals('Donwload', $this->object->getFileName('application/Espo/EntryPoints/Donwload.php'));
}
}
?>