function testCompileErrorsUntrusted() { foreach ($this->tplerrors2 as $k => $t) { $compil = new testJtplContentCompiler(); $compil->outputType = 'html'; $compil->trusted = false; try { $compil->compileContent2($t[0]); $this->fail("Test '{$k}', exception didn't happen"); } catch (Exception $e) { $this->assertEqual($e->getMessage(), $t[1], "Test '{$k}': %s "); } } }
function testCompileErrorsUntrusted() { foreach ($this->tplerrors2 as $k => $t) { $compil = new testJtplContentCompiler(); $compil->outputType = 'html'; $compil->trusted = false; try { $compil->compileContent2($t[0]); $this->fail("Test '{$k}', exception didn't happen"); } catch (jException $e) { $this->assertEqual($e->getLocaleKey(), $t[1], "Test '{$k}': %s (local parameters: " . var_export($e->getLocaleParameters(), true) . ")"); $this->assertEqualOrDiff($e->getLocaleParameters(), $t[2], "Test '{$k}': %s"); } catch (Exception $e) { $this->fail("Test '{$k}', Unknown Exception: " . $e->getMessage()); } } }