TYPO3 CMS  TYPO3_6-2
HttpUtilityTest.php
Go to the documentation of this file.
1 <?php
3 
22 
29  public function isUrlBuiltCorrectly(array $urlParts, $expected) {
31  $this->assertEquals($expected, $url);
32  }
33 
37  public function isUrlBuiltCorrectlyDataProvider() {
38  return array(
39  'rebuild url without scheme' => array(
40  parse_url('typo3.org/path/index.php'),
41  'typo3.org/path/index.php'
42  ),
43  'rebuild url with scheme' => array(
44  parse_url('http://typo3.org/path/index.php'),
45  'http://typo3.org/path/index.php'
46  ),
47  'rebuild url with all properties' => array(
48  parse_url('http://editor:secret@typo3.org:8080/path/index.php?query=data#fragment'),
49  'http://editor:secret@typo3.org:8080/path/index.php?query=data#fragment'
50  ),
51  'url without username, but password' => array(
52  array(
53  'scheme' => 'http',
54  'pass' => 'secrept',
55  'host' => 'typo3.org'
56  ),
57  'http://typo3.org'
58  )
59  );
60  }
61 
62 }
static buildUrl(array $urlParts)