mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
28 lines
726 B
PHP
28 lines
726 B
PHP
<?php
|
|
|
|
namespace App\Test\Fixture;
|
|
|
|
use Cake\TestSuite\Fixture\TestFixture;
|
|
|
|
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|
|
class BaseTestFixture extends TestFixture
|
|
{
|
|
|
|
protected function sqlEntrysToRecords($sql_entries, $fields) {
|
|
$field_array_keys = array_keys($fields);
|
|
$records = [];
|
|
foreach($sql_entries as $sql_entry) {
|
|
$record = [];
|
|
foreach($sql_entry as $i => $value) {
|
|
$field = $field_array_keys[$i];
|
|
$record[$field] = $value;
|
|
}
|
|
$records[] = $record;
|
|
}
|
|
}
|
|
} |