當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。