getCompiled() public static method

public static getCompiled ( ) : array
return array
コード例 #1
0
ファイル: QueryTest.php プロジェクト: namaljayathunga/DiDOM
 public function testGetCompiled()
 {
     Query::setCompiled([]);
     $selector = '.post h2';
     $xpath = '//*[contains(concat(" ", normalize-space(@class), " "), " post ")]//h2';
     $compiled = [$selector => $xpath];
     Query::compile($selector);
     $this->assertEquals($compiled, Query::getCompiled());
 }
コード例 #2
0
ファイル: QueryTest.php プロジェクト: ixtel/DiDOM
 public function testGetCompiled()
 {
     Query::setCompiled([]);
     $selector = '#foo .bar baz';
     $xpath = '//*[@id="foo"]//*[contains(concat(" ", normalize-space(@class), " "), " bar ")]//baz';
     $compiled = [$selector => $xpath];
     Query::compile($selector);
     $this->assertEquals($compiled, Query::getCompiled());
 }
コード例 #3
0
ファイル: QueryTest.php プロジェクト: napoler/t-drupal-module
 public function testGetCompiled()
 {
     Query::setCompiled([]);
     $selector = '.post h2';
     $xpath = "//*[contains(concat(' ', normalize-space(@class), ' '), ' post ')]";
     $compiled = [$selector => $xpath];
     $xpath = Query::compile($selector);
     $compiled = Query::getCompiled();
     $this->assertEquals($compiled, Query::getCompiled());
 }
コード例 #4
0
ファイル: QueryTest.php プロジェクト: nik4152/DiDOM
 public function testGetCompiled()
 {
     Query::setCompiled([]);
     $selector = '.post h2';
     $xpath = Query::compile($selector);
     $compiled = Query::getCompiled();
     $this->assertTrue(is_array($compiled));
     $this->assertEquals(1, count($compiled));
     $this->assertTrue(array_key_exists($selector, $compiled));
     $this->assertEquals($xpath, $compiled[$selector]);
 }