ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
LangCheckTest.php
Go to the documentation of this file.
1<?php
2require_once __DIR__ . '/LangCheck.php';
3
5{
11 public function languageProvider()
12 {
13 $data = array();
14 foreach (glob(__DIR__ . '/../src/geshi/*.php') as $file) {
15 $base = basename($file, '.php');
16 $data[$base] = array($file);
17 }
18 return $data;
19 }
20
25 public function test_langfile($file)
26 {
27 $check = new LangCheck($file);
28 $result = $check->runChecks();
29 $issues = $check->getIssuesAsString();
30
31 $this->assertTrue($result, "The following issues were found in $file:\n" . $issues);
32 }
33}
$result
An exception for terminatinating execution or to throw for unit testing.
languageProvider()
Read all available language files.
test_langfile($file)
@dataProvider languageProvider
Class LangCheck.
Definition: LangCheck.php:10
$base
Definition: index.php:4
$data
Definition: bench.php:6