Commit 7f9fcf8b authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #7783: Rewrote unit test

parent 2ba7b197
Pipeline #1448 passed with stage
in 2 minutes and 14 seconds
......@@ -26,46 +26,25 @@ class HelperFileTest extends TestCase {
$this->assertEquals('', HelperFile::getFileTypeHighlight('','fileadmin/test.js'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,''));
$this->assertEquals('' , HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.js'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,''));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,''));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,''));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,''));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,''));
$this->assertEquals('' , HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,'fileadmin/test.js'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.php'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.js'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.php.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.php'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,'fileadmin/test.php'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,'fileadmin/test.php'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,'fileadmin/test.php'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,'fileadmin/test.php'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.qfq'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.qfq'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,'fileadmin/test.qfq'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,'fileadmin/test.qfq'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,'fileadmin/test.qfq'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,'fileadmin/test.qfq'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.py'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.py'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,'fileadmin/test.py'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,'fileadmin/test.py'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,'fileadmin/test.py'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,'fileadmin/test.py'));
$this->assertEquals('', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_OFF,'fileadmin/test.m'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_AUTO,'fileadmin/test.m'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/javascript.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_JAVASCRIPT,'fileadmin/test.m'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.qfq.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_QFQ,'fileadmin/test.m'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.py.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_PYTHON,'fileadmin/test.m'));
$this->assertEquals(DIR_HIGHLIGHT_JSON . '/highlight.m.json', HelperFile::getFileTypeHighlight(FE_HIGHLIGHT_MATLAB,'fileadmin/test.m'));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment