コード例 #1
0
ファイル: aliasesTest.php プロジェクト: jbzoo/phpunit
 public function testString()
 {
     isLike('#t.st#i', 'TESTO');
     isNotLike('#teeest#i', 'TESTO');
     isContain('t', 'test');
     isNotContain('x', 'test');
 }
コード例 #2
0
ファイル: AppTest.php プロジェクト: JBZoo/Console
 public function testExecute()
 {
     $uniq = uniqid('', true);
     $output = cmd('php ./bin/jbzoo test', array('option' => $uniq));
     isContain($uniq, $output);
     isContain('qwerty', $output);
     isContain('Success', $output);
 }
コード例 #3
0
ファイル: ResponseTest.php プロジェクト: JBZoo/CrossCMS
 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'));
 }
コード例 #4
0
        $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}");
コード例 #5
0
ファイル: HeaderTest.php プロジェクト: JBZoo/CrossCMS
 public function testCSSCode()
 {
     $uniq = uniqid('', true);
     $result = $this->helper->request(__METHOD__, array('test-header-csscode' => $uniq));
     isSame(200, $result->code);
     isContain($uniq, $result->body);
 }