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


PHP CssSelector::enableHtmlExtension方法代码示例

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


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

示例1: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(atoum\adapter $adapter = null, atoum\annotations\extractor $annotationExtractor = null, atoum\asserter\generator $asserterGenerator = null, atoum\test\assertion\manager $assertionManager = null, \closure $reflectionClassFactory = null)
 {
     parent::__construct($adapter, $annotationExtractor, $asserterGenerator, $assertionManager, $reflectionClassFactory);
     $generator = $this->getAsserterGenerator();
     $test = $this;
     $crawler = null;
     $client = null;
     $this->getAssertionManager()->setHandler('request', function (array $options = array(), array $server = array(), array $cookies = array()) use(&$client, $test) {
         $client = $test->createClient($options, $server, $cookies);
         return $test;
     })->setHandler('get', $get = $this->getSendRequestHandler($client, $crawler, 'GET'))->setHandler('GET', $get)->setHandler('head', $head = $this->getSendRequestHandler($client, $crawler, 'HEAD'))->setHandler('HEAD', $head)->setHandler('post', $post = $this->getSendRequestHandler($client, $crawler, 'POST'))->setHandler('POST', $post)->setHandler('put', $put = $this->getSendRequestHandler($client, $crawler, 'PUT'))->setHandler('PUT', $put)->setHandler('patch', $patch = $this->getSendRequestHandler($client, $crawler, 'PATCH'))->setHandler('PATCH', $patch)->setHandler('delete', $delete = $this->getSendRequestHandler($client, $crawler, 'DELETE'))->setHandler('DELETE', $delete)->setHandler('options', $options = $this->getSendRequestHandler($client, $crawler, 'OPTIONS'))->setHandler('OPTIONS', $options)->setHandler('crawler', function ($strict = false) use(&$crawler, $generator, $test) {
         if ($strict) {
             CssSelector::enableHtmlExtension();
         } else {
             CssSelector::disableHtmlExtension();
         }
         return $generator->getAsserterInstance('\\atoum\\AtoumBundle\\Test\\Asserters\\Crawler', array($crawler), $test);
     });
 }
开发者ID:aliel,项目名称:AtoumBundle,代码行数:22,代码来源:WebTestCase.php


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