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


PHP WebTestCase::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $kernel = new \AppKernel('test', true);
     $kernel->boot();
     $this->_container = $kernel->getContainer();
     parent::__construct();
 }
开发者ID:neilferreira,项目名称:symfony-standard,代码行数:7,代码来源:BaseTestCase.php

示例2: __construct

 public function __construct()
 {
     $this->auth_agency = '200100';
     $this->auth_secret = sha1('agency_200100_secret');
     $this->auth_pk = md5('agency_200100_public');
     parent::__construct();
 }
开发者ID:rimi-itk,项目名称:bpi-web-service,代码行数:7,代码来源:SDKTestCase.php

示例3: __construct

 /**
  * __construct function.
  * 
  * @access public
  * @param mixed $name (default: null)
  * @return void
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     static::$container = static::$kernel->getContainer();
 }
开发者ID:videni,项目名称:MEFSocketBundle,代码行数:14,代码来源:ApplicationTestCase.php

示例4: __construct

 public function __construct($name = NULL, array $data = [], $dataName = "")
 {
     parent::__construct($name, $data, $dataName);
     if (!static::$kernel) {
         static::$kernel = self::createKernel(['environment' => $this->enviroment, 'debug' => TRUE]);
         static::$kernel->boot();
     }
     $this->container = self::$kernel->getContainer();
 }
开发者ID:AnkaraPHP,项目名称:pheetup,代码行数:9,代码来源:ControllerTestCase.php

示例5: __construct

 /**
  * Constructor
  *
  * @param string|null $name     Test name
  * @param array       $data     Test data
  * @param string      $dataName Data name
  */
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     if (!static::$kernel) {
         static::$kernel = self::createKernel(array('environment' => $this->environment, 'debug' => $this->debug));
         static::$kernel->boot();
     }
     $this->container = static::$kernel->getContainer();
     $this->em = $this->getEntityManager();
 }
开发者ID:franiglesias,项目名称:milhojas,代码行数:17,代码来源:DoctrineTestCase.php

示例6: __construct

 /**
  * Inject Guzzle in this test class
  * And set up the given client for use on
  * Damn Vulnerable Web Application... A vulnerable application
  * without API...
  * Difficulty resided in finding the way of using
  * cookies and correct documentation for all methods.
  */
 public function __construct()
 {
     parent::__construct();
     //prepare a cookie jar
     $jar = new ArrayCookieJar();
     $cookiePlugin = new CookiePlugin($jar);
     //get a guzzle instance
     $this->_dvwa_guzzle = new Client();
     $this->_dvwa_guzzle->setBaseUrl($this->DVWA_URL);
     $this->_dvwa_guzzle->setUserAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36");
     $this->_dvwa_guzzle->addSubscriber($cookiePlugin);
     //first request/response exchange to get CSRF token
     $request = $this->_dvwa_guzzle->get('login.php', null, ["allow_redirects" => false]);
     $response = $request->send();
     $str = $response->getBody();
     preg_match($this->USER_TOKEN_REGEX, $str, $matches);
     $user_token = $matches[1];
     //second exchange to login
     $request = $this->_dvwa_guzzle->createRequest('POST', 'login.php', null, ['username' => 'admin', 'password' => 'password', 'Login' => 'Login', 'user_token' => $user_token], ["allow_redirects" => true]);
     $request->send();
 }
开发者ID:haterecoil,项目名称:zerowing,代码行数:29,代码来源:PentestControllerTest.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:ubermichael,项目名称:symftest,代码行数:4,代码来源:LOMWebTestCase.php

示例8: __construct

 /**
  * Constructor
  *
  * @param string|null $name     Test name
  * @param array       $data     Test data
  * @param string      $dataName Data name
  */
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
 }
开发者ID:kipelovets,项目名称:kipelovets,代码行数:11,代码来源:PartyRepositoryTest.php

示例9: __construct

 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     // seems like this can not be used outside of the constructor...
     $this->dslDir = __DIR__ . '/../dsl';
 }
开发者ID:kaliop-uk,项目名称:ezmigrationbundle,代码行数:6,代码来源:CommandTest.php


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