index.php 1003 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. include_once '../../simpletest/autorun.php';
  3. include_once '../pquery.config.php';
  4. include_once PQUERY_ROOT.'pquery.php';
  5. function is_test_file($filename) {
  6. return preg_match('/^test_\w+\.php$/', $filename);
  7. }
  8. foreach( array_filter(scandir('.'), 'is_test_file') as $file )
  9. include_once $file;
  10. /*include_once '../../debug.php';
  11. include_once '../pquery.php';*/
  12. //__p::require_plugins('array', 'sql', 'template');
  13. // Array test
  14. /*$a = _p(range(0, 10));
  15. while( !$a->is_empty() ) {
  16. debug($a->pop(), $a->reverse()->pop());
  17. }*/
  18. // SQL test
  19. /*$sql = _sql("select * from posts where slug = '[slug]'")
  20. ->set(array('slug' => 'contact'));
  21. $results = $sql->fetch_all('object');
  22. $results = _arr($results);
  23. debug($results);*/
  24. /*__tpl::set_root('templates', false);
  25. $tpl = _tpl('test.tpl');
  26. $test1 = $tpl->data->add('test1', array('var' => 'some-variable'));
  27. $tpl->data->add('test1', array('var' => 'some-other-variable'));
  28. $test1->add('test2');
  29. $tpl->data->add('test3');
  30. debug($tpl->parse());*/
  31. ?>