testing search function

This commit is contained in:
Viktor Pedersen 2021-09-08 14:32:35 +02:00
parent ffec00444f
commit 6c9aa4dcdd
2 changed files with 6 additions and 7 deletions

@ -142,9 +142,9 @@ class Product extends Entity {
} }
if($matchAll && array_diff_assoc($terms, $matches)) { if($matchAll && array_diff_assoc($terms, $matches)) {
print('=== DEBUG $terms ===<br>'); // print('=== DEBUG $terms ===<br>');
var_dump($terms); // var_dump($terms);
print('<br><br>'); // print('<br><br>');
print('=== DEBUG $matches ===<br>'); print('=== DEBUG $matches ===<br>');
var_dump($matches); var_dump($matches);
print('<br><br>'); print('<br><br>');

@ -30,10 +30,9 @@ class SearchPage extends Page {
} }
print('<br>'); print('<br>');
foreach(array('user', 'product') as $type) { foreach(array('user', 'product') as $type) {
print('=== DEBUG $type: '); // print('=== DEBUG $type: ');
print_r($type); // print_r($type);
print(' ===<br>'); // print(' ===<br><br>');
print('<br>');
$result = $this->search($type, $this->terms); $result = $this->search($type, $this->terms);
if($result) { if($result) {
$out[$type] = $result; $out[$type] = $result;