4 * Generate files used during testing.
6 class CRM_Core_CodeGen_Test
extends CRM_Core_CodeGen_BaseTask
{
8 public function run() {
9 $this->generateCiviTestTruncate();
12 public function generateCiviTestTruncate() {
13 echo "Generating tests truncate file\n";
16 $truncate = '<?xml version="1.0" encoding="UTF-8" ?>
17 <!-- Truncate all tables that will be used in the tests -->
19 $tbls = array_keys($this->tables
);
20 foreach ($tbls as $d => $t) {
21 $truncate = $truncate . "\n <$t />\n";
24 $truncate = $truncate . "</dataset>\n";
25 file_put_contents($this->config
->sqlCodePath
. "../tests/phpunit/CiviTest/truncate.xml", $truncate);