Exemplo n.º 1
0
 protected function execInit(AIIXTestContext $init, $quiet = false)
 {
     $temp = $this->evalPragmas('return', $init);
     unset($init->code);
     if ($temp === false) {
         $init = false;
     } else {
         $quiet and ob_start();
         $init->exec();
         $quiet and ob_clean();
         //TODO on failure ???
         self::$SHARED = array_merge(self::$SHARED, $init->vars);
     }
 }
Exemplo n.º 2
0
<?php

$array2 = $array1 = $_array;
\AIIX\Data::build($array1);
\AIIX\Data::build($array2, array('@b' => 'pool'));
$data1 = new \AIIX\Data($_array);
$data2 = new \AIIX\Data($_array, true);
$data3 = new \AIIX\Data($_array, array('@b' => 'pool'));
return AIIXTest::is_true($data1['a']['y'] === '@b', $data2['a']['y'][0] === 'zero', $data3['a']['y'] === 'pool');
Exemplo n.º 3
0
<?php

$v1 = \AIIX\Data::hasp($_array, 'a');
$v2 = $_data->has('a');
$v3 = \AIIX\Data::hasp($_array, 'a/x');
$v4 = $_data->has('a/x');
$v5 = $_data->has('a/u');
$v6 = $_data->has('a/u/z');
$v7 = $_data->has(' a / x ');
return AIIXTest::is_true($v3, $v4, $v3, $v4, $v7, !$v5, !$v6);
Exemplo n.º 4
0
<?php

$a[1][2][] = 'ok';
echo $_hidden;
return AIIXTest::assertion($a[1][2][0], !$a[1][2][1]);
Exemplo n.º 5
0
<?php

$v = $_data->get();
$v1 = \AIIX\Data::getp($_array, 'a');
$v2 = $_data->get('a');
$v3 = \AIIX\Data::getp($_array, 'a/x');
$v4 = $_data->get('a/x');
$v5 = $_data->get('a/u', 456);
$v6 = $_data->get('a/u/z', '789');
$v7 = $_data->get(' a / x ', '???');
return AIIXTest::is_true($v3 === $v4, $v3 === $v7);
Exemplo n.º 6
0
<?php

$_a = array(true, false, 'xyz' => array('aiix'));
$v1 = $_array;
$d1 = new \AIIX\Data($v1, true);
\AIIX\Data::setp($v1, 'c', true);
$d1->set('c', true);
\AIIX\Data::setp($v1, 'd', $_a);
$d1->set('d', $_a);
$d1->set('e/f', 'ef');
$d1->set('e/f/g', 'efg');
$d1->set('k1/k2', 'k')->set('m1/m2', 'm');
\AIIX\Data::setp($v1, ' multi word / key ', 'qwerty');
$d1->set(' multi word / key ', 'querty');
//echo $d1->get('d/xyz/0');
return AIIXTest::is_true(\AIIX\Data::getp($v1, 'c') === true, $d1->get('c') === true, \AIIX\Data::getp($v1, 'd/xyz/0') === 'aiix', $d1->get('d/xyz/0') === 'aiix', \AIIX\Data::getp($v1, ' multi word / key ') === 'qwerty', $d1->get(' multi word / key ') === 'querty');
Exemplo n.º 7
0
<?php

$var = 'a string';
return AIIXTest::is_true($var);