File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / url / bug63162.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:10 2013 UTC (11 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Test parse_url() for bug #63162
--DESCRIPTION--
This test covers tests the inputs:
[0]=> http://user:pass@host
[1]=> //user:pass@host
[2]=> //user@host
--FILE--
<?php
var_dump(parse_url('http://user:pass@host'));
var_dump(parse_url('//user:pass@host'));
var_dump(parse_url('//user@host'));
?>
--EXPECT--
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(4) "host"
  ["user"]=>
  string(4) "user"
  ["pass"]=>
  string(4) "pass"
}
array(3) {
  ["host"]=>
  string(4) "host"
  ["user"]=>
  string(4) "user"
  ["pass"]=>
  string(4) "pass"
}
array(2) {
  ["host"]=>
  string(4) "host"
  ["user"]=>
  string(4) "user"
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>