本文整理汇总了PHP中Espo\Core\Utils\Util::fixPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::fixPath方法的具体用法?PHP Util::fixPath怎么用?PHP Util::fixPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Espo\Core\Utils\Util
的用法示例。
在下文中一共展示了Util::fixPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConcatPath
public function testConcatPath()
{
$result = Util::fixPath('dir1/dir2/file1.json');
$this->assertEquals($result, Util::concatPath('dir1/dir2', 'file1.json'));
$result = Util::fixPath('dir1/dir2/file1.json');
$this->assertEquals($result, Util::concatPath('dir1/dir2/', 'file1.json'));
$result = Util::fixPath('dir1/dir2/file1.json');
$this->assertEquals($result, Util::concatPath('dir1/dir2/file1.json'));
$input = array('dir1/dir2', 'file1.json');
$result = Util::fixPath('dir1/dir2/file1.json');
$this->assertEquals($result, Util::concatPath($input));
$input = array('dir1/', 'dir2', 'file1.json');
$result = Util::fixPath('dir1/dir2/file1.json');
$this->assertEquals($result, Util::concatPath($input));
}
示例2: testGetLayoutPathModule
function testGetLayoutPathModule()
{
$this->objects['metadata']->expects($this->exactly(1))->method('getScopeModuleName')->will($this->returnValue('Crm'));
$this->assertEquals(Util::fixPath('application/Espo/Modules/Crm/Resources/layouts/Call'), $this->reflection->invokeMethod('getLayoutPath', array('Call')));
$this->assertEquals(Util::fixPath('custom/Espo/Custom/Resources/layouts/Call'), $this->reflection->invokeMethod('getLayoutPath', array('Call', true)));
}
示例3: testGetPath
public function testGetPath()
{
$packageId = $this->reflection->invokeMethod('getProcessId');
$packagePath = Util::fixPath($this->actionManagerParams['packagePath'] . '/' . $packageId);
$this->assertEquals($packagePath, $this->reflection->invokeMethod('getPath', array()));
$this->assertEquals($packagePath, $this->reflection->invokeMethod('getPath', array('packagePath')));
$postfix = $this->reflection->getProperty('packagePostfix');
$this->assertEquals($packagePath . $postfix, $this->reflection->invokeMethod('getPath', array('packagePath', true)));
$backupPath = Util::fixPath($this->actionManagerParams['backupPath'] . '/' . $packageId);
$this->assertEquals($backupPath, $this->reflection->invokeMethod('getPath', array('backupPath')));
}
示例4: testGetRootDir
public function testGetRootDir()
{
$rootDir = dirname(__FILE__);
$rootDir = str_replace(Util::fixPath('/tests/Espo/Core/Utils'), '', $rootDir);
$this->assertEquals($rootDir, $this->object->getRootDir());
}
示例5: testGetSingeFileListOnlyFiles
public function testGetSingeFileListOnlyFiles()
{
$input = array('custom' => array('Espo' => array('Custom' => array('Modules' => array('ExtensionTest' => array(0 => 'File.json', 1 => 'File.php'))))));
$result = array(Util::fixPath('custom/Espo/Custom/Modules/ExtensionTest/File.json'), Util::fixPath('custom/Espo/Custom/Modules/ExtensionTest/File.php'));
$this->assertEquals($result, $this->reflection->invokeMethod('getSingeFileList', array($input, true)));
}