• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Codeception\Module类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Codeception\Module的典型用法代码示例。如果您正苦于以下问题:PHP Module类的具体用法?PHP Module怎么用?PHP Module使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __construct

 /**
  * @param \Codeception\Lib\ModuleContainer $moduleContainer
  * @param null $config
  */
 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     parent::__construct($moduleContainer, $config);
     if (!empty($config['enabled'])) {
         $this->generateTransferObjects();
     }
 }
开发者ID:spryker,项目名称:Transfer,代码行数:11,代码来源:TransferGenerate.php


示例2: _initialize

 public function _initialize()
 {
     if (!function_exists('xmlrpc_encode_request')) {
         throw new ModuleRequireException(__CLASS__, "XMLRPC module requires installed php_xmlrpc extension");
     }
     parent::_initialize();
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:7,代码来源:XMLRPC.php


示例3: __construct

 /**
  * @param \Codeception\Lib\ModuleContainer $moduleContainer
  * @param array|null $config
  */
 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     parent::__construct($moduleContainer, $config);
     if (!empty($config['enabled'])) {
         $this->initPropel();
     }
 }
开发者ID:spryker,项目名称:Propel,代码行数:11,代码来源:PropelInstall.php


示例4: __construct

 /**
  * @param \Codeception\Lib\ModuleContainer $moduleContainer
  * @param null $config
  */
 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     parent::__construct($moduleContainer, $config);
     if (isset($this->config['enabled']) && $this->config['enabled']) {
         $this->copyBundleConfigurationFiles();
         $this->generateConfigDefaultFile();
     }
 }
开发者ID:spryker,项目名称:Config,代码行数:12,代码来源:ConfigInit.php


示例5: validateConfig

 /**
  * Ensure the class specified is valid.
  *
  * @see \Codeception\Module::validateConfig()
  * @throws \Codeception\Exception\ModuleConfig
  */
 protected function validateConfig()
 {
     parent::validateConfig();
     $class = $this->config['class'];
     if (!class_exists($class)) {
         throw new \Codeception\Exception\ModuleConfig("DrupalVariable", "Invalid config. Class '{$class}' does not exist");
     }
     $interface = "Codeception\\Module\\Drupal\\Variable\\VariableStorage\\StorageInterface";
     if (!in_array($interface, class_implements($class))) {
         throw new \Codeception\Exception\ModuleConfig("DrupalVariable", "Invalid config. Class '{$class}' must implement '{$interface}'");
     }
 }
开发者ID:ixis,项目名称:codeception-drupal-variable,代码行数:18,代码来源:DrupalVariable.php


示例6: __construct

 /**
  * Drupal8Module constructor.
  */
 public function __construct(ModuleContainer $container, $config = null)
 {
     $this->config = array_merge(['drupal_root' => Configuration::projectDir() . 'web', 'site_path' => 'sites/test', 'create_users' => true, 'destroy_users' => true, 'test_user_pass' => 'test'], (array) $config);
     // Bootstrap a bare minimum Kernel so we can interact with Drupal.
     $autoloader = (require $this->config['drupal_root'] . '/autoload.php');
     $kernel = new TestDrupalKernel('prod', $autoloader, $this->config['drupal_root']);
     $kernel->bootTestEnvironment($this->config['site_path']);
     // Allow for setting some basic info output.
     $this->output = new ConsoleOutput();
     // Get our role definitions as we use them a lot.
     $this->roles = Role::loadMultiple();
     parent::__construct($container);
 }
开发者ID:dustinleblanc,项目名称:codeception-drupal-8,代码行数:16,代码来源:Drupal8.php


示例7: __construct

 /**
  * @param ModuleContainer $moduleContainer
  * @param null            $config
  */
 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     parent::__construct($moduleContainer, $config);
     $this->fs = $this->getModule('Filesystem');
     $packageDir = dirname(dirname(dirname(dirname(__FILE__))));
     $this->projectDirTemplate = "{$packageDir}/tests/_data/project_template";
     $this->projectRoot = "{$packageDir}/{$config['test_path']}";
     // Set the project root for the NpmPackage module
     if ($moduleContainer->hasModule('\\CubicMushroom\\Tools\\ProjectToolbelt\\Codeception\\Helper\\NpmPackage')) {
         /** @var JsonFile $npmPackageModule */
         $npmPackageModule = $moduleContainer->getModule('\\CubicMushroom\\Tools\\ProjectToolbelt\\Codeception\\Helper\\NpmPackage');
         $npmPackageModule->_reconfigure([JsonFile::CONFIG_PROJECT_ROOT => $this->projectRoot]);
     }
 }
开发者ID:cubicmushroom,项目名称:project-toolbelt,代码行数:18,代码来源:Functional.php


示例8: __construct

 /**
  * @param ModuleContainer $moduleContainer
  * @param array           $config
  *
  * @throws ModuleRequireException if required modules are not available
  */
 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     parent::__construct($moduleContainer, $config);
     $missingModules = [];
     foreach ($this->requiredModules as $module) {
         if (!$moduleContainer->hasModule($module)) {
             $missingModules[] = $module;
         }
     }
     if (!empty($missingModules)) {
         throw new ModuleRequireException('Missing the following modules, required by the NpmPackage module are missing...', implode(', ', $missingModules));
     }
     $this->fs = $moduleContainer->getModule('Filesystem');
 }
开发者ID:cubicmushroom,项目名称:project-toolbelt,代码行数:20,代码来源:JsonFile.php


示例9: __construct

 /**
  * @param ModuleContainer $container
  * @param null $config
  */
 public function __construct(ModuleContainer $container, $config = null)
 {
     parent::__construct($container, $config);
 }
开发者ID:rezouce,项目名称:codeception-mongodb-cleanstate,代码行数:8,代码来源:MongoDbCleanState.php


示例10: _after

 /**
  * {@inheritDoc}
  * @see \Codeception\Module::_after()
  */
 public function _after(TestCase $testCase)
 {
     parent::_after($testCase);
     $this->throwExceptionOnHttpMockError();
     $this->diManager->get('httpMockServer')->clean();
 }
开发者ID:mcustiel,项目名称:codeception-http-mock,代码行数:10,代码来源:HttpMock.php


示例11: __construct

 public function __construct(ModuleContainer $moduleContainer, $config, WP $wp = null)
 {
     parent::__construct($moduleContainer, $config);
     $this->wp = $wp ? $wp : new WP();
 }
开发者ID:lucatume,项目名称:wp-browser,代码行数:5,代码来源:WPLoader.php


示例12: __construct

 public function __construct(ModuleContainer $moduleContainer, $config = null)
 {
     //$this->I = $moduleContainer->getModule("WebDriver");
     parent::__construct($moduleContainer, $config);
     $this->I = $this->moduleContainer->getModule("WebDriver");
 }
开发者ID:silverstripe-australia,项目名称:ssautesting,代码行数:6,代码来源:SilverstripeFunctional.php


示例13: _failed

 /**
  * @param \Codeception\TestCase $test
  * @param bool $fail
  *
  * @return void
  */
 public function _failed(TestCase $test, $fail)
 {
     parent::_failed($test, $fail);
     if (session_status() === PHP_SESSION_ACTIVE) {
         session_destroy();
     }
 }
开发者ID:spryker,项目名称:Transfer,代码行数:13,代码来源:Functional.php


示例14: validateConfig

 /**
  * Provide and override for the config settings and allow custom settings depending on the service being used.
  */
 protected function validateConfig()
 {
     $this->IMDriver = $this->createIMDriver();
     $this->requiredFields = $this->IMDriver->getRequiredConfig();
     $this->config = array_merge($this->IMDriver->getDefaultConfig(), $this->config);
     parent::validateConfig();
 }
开发者ID:nathanmac,项目名称:im-codeception-module,代码行数:10,代码来源:IM.php


示例15: _before

 public function _before(\Codeception\TestCase $test)
 {
     parent::_before($test);
     /////////////////////////////////////
     // initialize your database here
     /////////////////////////////////////
 }
开发者ID:mjarschel,项目名称:komenco,代码行数:7,代码来源:UIHelper.php


示例16: _failed

 /**
  * @param \Codeception\TestCase $test
  * @param bool $fail
  *
  * @return void
  */
 public function _failed(TestCase $test, $fail)
 {
     parent::_failed($test, $fail);
     Propel::getWriteConnection('zed')->rollBack();
     if (session_status() === PHP_SESSION_ACTIVE) {
         session_destroy();
     }
 }
开发者ID:spryker,项目名称:Stock,代码行数:14,代码来源:Functional.php


示例17: __construct

 public function __construct($config = null)
 {
     // terminology: see = isXyz => true/false, have = create, grab = get => data
     if (!isset($config['hosts'])) {
         throw new \Exception('please configure hosts for ElasticSearch codeception module');
     }
     if (isset($config['hosts']) && !is_array($config['hosts'])) {
         $config['hosts'] = array($config['hosts']);
     }
     $this->config = (array) $config;
     parent::__construct();
 }
开发者ID:jotweh,项目名称:codeception-elasticsearch,代码行数:12,代码来源:ElasticSearch.php


示例18: _after

 public function _after(TestCase $test)
 {
     foreach ($this->insertedIds as $id) {
         try {
             $this->auth0Api->users->delete($id);
         } catch (\Exception $e) {
             $this->debug(sprintf('id: "%s" not removed: "%s"', $id, $e->__toString()));
         }
     }
     $this->insertedIds = [];
     parent::_after($test);
 }
开发者ID:RiskioFr,项目名称:codeception-auth0-module,代码行数:12,代码来源:Auth0.php


示例19: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($config = null)
 {
     parent::__construct($config);
     \Yii::import('system.cli.commands.MigrateCommand');
     $configFile = \Yii::getPathOfAlias('application.config.console') . '.php';
     $config = (include $configFile);
     $this->_command = new \MigrateCommand(null, null);
     foreach ($config['commandMap']['migrate'] as $option => $value) {
         if ($option === 'class') {
             continue;
         } else {
             if ($option === 'migrationPath') {
                 $this->_command->{$option} = \Yii::getPathOfAlias($value);
             } else {
                 $this->_command->{$option} = $value;
             }
         }
     }
     $this->_command->interactive = false;
     static::$_instance = $this;
 }
开发者ID:EhteshamMehmood,项目名称:BlogMVC,代码行数:24,代码来源:MigrationHelper.php


示例20: __construct

 public function __construct()
 {
     parent::__construct();
     self::$baseMockPath = __DIR__ . '/mock/';
 }
开发者ID:lepca,项目名称:AllediaFramework,代码行数:5,代码来源:ExtensionsGenericHelper.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Codeception\TestCase类代码示例发布时间:2022-05-23
下一篇:
PHP Codeception\Configuration类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap