当前位置: 首页>>代码示例>>PHP>>正文


PHP Test::init方法代码示例

本文整理汇总了PHP中Test::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::init方法的具体用法?PHP Test::init怎么用?PHP Test::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Test的用法示例。


在下文中一共展示了Test::init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadTests

 /**
  * Load the Codeception tests from disk.
  */
 public function loadTests()
 {
     if (!isset($this->config['tests'])) {
         return;
     }
     foreach ($this->config['tests'] as $type => $active) {
         // If the test type has been disabled in the Webception config,
         //      skip processing the directory read for those tests.
         if (!$active) {
             break;
         }
         // if test folder is not exitst skipping
         if (!file_exists($this->config['paths']['tests'] . $this->config['DS'] . $type)) {
             continue;
         }
         $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator("{$this->config['paths']['tests']}" . $this->config['DS'] . "{$type}" . $this->config['DS'], \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST);
         // Iterate through all the files, and filter out
         //  any files that are in the ignore list.
         foreach ($files as $file) {
             if (!isset($this->config['ignore'][$type]) || !in_array($file->getFilename(), $this->config['ignore'][$type]) && $file->isFile()) {
                 // Declare a new test and add it to the list.
                 $test = new Test();
                 $test->init($type, $file);
                 $this->addTest($test);
                 unset($test);
             }
         }
     }
 }
开发者ID:johnitvn,项目名称:mg075hynlo5793r5gt,代码行数:32,代码来源:Codeception.class.php

示例2: init

<?php

/**
 * Test Script init file
 * User: winglechen
 * Date: 15/10/22
 * Time: 15:26
 */
namespace Zan\Framework;

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/Zan.php';
class Test
{
    public static function init()
    {
    }
}
Test::init();
开发者ID:vimac,项目名称:zan,代码行数:19,代码来源:Test.php

示例3: run

 public static function run()
 {
     if (isset($_GET['mode'])) {
         $mode = $_GET['mode'];
     } else {
         $mode = "";
     }
     $request = True;
     //najskôr vyriadime požiadavku
     if ($mode == self::MODE_LOGIN && isset($_POST['password'])) {
         Auth::login($_POST['password']);
     } else {
         if ($mode == self::MODE_SUBMIT_TEST) {
             if (Auth::isAuth()) {
                 Test::submit();
             } else {
                 Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
             }
         } else {
             if ($mode == self::MODE_LOGOUT) {
                 if (Auth::isAuth()) {
                     Auth::logout();
                 } else {
                     Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
                 }
             } else {
                 if ($mode == self::MODE_DEL_PREDMET) {
                     if (Auth::isAdmin()) {
                         Admin::delPredmet();
                     } else {
                         Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
                     }
                 } else {
                     if ($mode == self::MODE_ADD_CLASS) {
                         if (Auth::isAdmin()) {
                             Admin::addClass();
                         } else {
                             Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
                         }
                     } else {
                         if ($mode == self::MODE_DEL_CLASS) {
                             if (Auth::isAdmin()) {
                                 Admin::delClass();
                             } else {
                                 Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
                             }
                         } else {
                             if ($mode == self::MODE_ADD_PREDMET) {
                                 if (Auth::isAuth()) {
                                     Admin::addPredmet();
                                 } else {
                                     Viewer::addMessage("Na túto akciu nemáš prístup !", Viewer::ERROR);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     //a idem spracovť stránku
     //ak som prihlásený a chcem sa znova prihlásiť tak mi to nepojde
     if (self::$page == self::LOGIN && Auth::isAuth()) {
         Viewer::setPage(self::TEST_LIST);
     }
     if (self::$page == self::TEST_LIST) {
         TestList::init();
     } else {
         if (self::$page == self::TEST) {
             Test::init();
         } else {
             if (self::$page == self::STATS) {
                 Stats::init();
             } else {
                 if (self::$page == self::ADMIN) {
                     Admin::init();
                 }
             }
         }
     }
 }
开发者ID:kabell,项目名称:dotaznik,代码行数:81,代码来源:Viewer.php


注:本文中的Test::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。