Exemplo n.º 1
0
 public function testString()
 {
     isLike('#t.st#i', 'TESTO');
     isNotLike('#teeest#i', 'TESTO');
     isContain('t', 'test');
     isNotContain('x', 'test');
 }
Exemplo n.º 2
0
 public function testExecute()
 {
     $uniq = uniqid('', true);
     $output = cmd('php ./bin/jbzoo test', array('option' => $uniq));
     isContain($uniq, $output);
     isContain('qwerty', $output);
     isContain('Success', $output);
 }
Exemplo n.º 3
0
 public function testNocache()
 {
     $result = $this->helper->request(__METHOD__, array('test-response-nocache' => 1));
     isSame('no-cache', $result->find('headers.pragma'));
     isContain('no-store', $result->find('headers.cache-control'));
     isContain('no-cache', $result->find('headers.cache-control'));
     isContain('must-revalidate', $result->find('headers.cache-control'));
 }
        $contain_word = $contain_word || strpos(strtolower($desc), $word) !== false;
    }
    return $contain_word;
}
$updates = array();
foreach ($catalogs as $c) {
    if (array_key_exists($c['navigation'], $direct_transfer)) {
        $contain_zirkonia = isContain('zirkonia', $c['name'], $c['description']);
        if ($contain_zirkonia && array_key_exists($c['navigation'], $zirkonia)) {
            $updates[$c['jng_sp_catalog_id']] = $zirkonia[$c['navigation']];
        } else {
            $updates[$c['jng_sp_catalog_id']] = $direct_transfer[$c['navigation']];
        }
    } else {
        $contain_charm = isContain('charm', $c['name']);
        $contain_sammel = isContain('sammel', $c['name']);
        if ($contain_charm && array_key_exists($c['navigation'], $charms)) {
            $updates[$c['jng_sp_catalog_id']] = $charms[$c['navigation']];
        } elseif ($contain_sammel && array_key_exists($c['navigation'], $beads)) {
            $updates[$c['jng_sp_catalog_id']] = $beads[$c['navigation']];
        }
    }
}
foreach ($updates as $id => $nav) {
    if ($catalogs[$id]['navigation2'] == '') {
        tep_db_query("UPDATE jng_sp_catalog SET navigation2='0,{$nav},0' WHERE jng_sp_catalog_id={$id}");
    } else {
        $nav2 = explode(',', $catalogs[$id]['navigation2']);
        $nav2[1] = $nav;
        $newnav = implode(',', $nav2);
        tep_db_query("UPDATE jng_sp_catalog SET navigation2='{$newnav}' WHERE jng_sp_catalog_id={$id}");
Exemplo n.º 5
0
 public function testCSSCode()
 {
     $uniq = uniqid('', true);
     $result = $this->helper->request(__METHOD__, array('test-header-csscode' => $uniq));
     isSame(200, $result->code);
     isContain($uniq, $result->body);
 }