File: PsrHttpMessageUriFactoryInterface.phpt

package info (click to toggle)
php-psr 1.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: ansic: 1,485; pascal: 203; xml: 150; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 756 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Psr\Http\Message\UriFactoryInterface
--SKIPIF--
<?php include('skip.inc'); ?>
--FILE--
<?php
include __DIR__ . '/SampleUri.inc';
include __DIR__ . '/SampleUriFactory.inc';
var_dump(interface_exists('\\Psr\\Http\\Message\\UriFactoryInterface', false));
var_dump(class_implements('SampleUriFactory', false));
$factory = new SampleUriFactory();
$uri = $factory->createUri();
var_dump($uri instanceof \Psr\Http\Message\UriInterface);
$factory->createUri('http://domain.com');
--EXPECT--
bool(true)
array(1) {
  ["PsrExt\Http\Message\UriFactoryInterface"]=>
  string(39) "PsrExt\Http\Message\UriFactoryInterface"
}
string(27) "SampleUriFactory::createUri"
string(0) ""
bool(true)
string(27) "SampleUriFactory::createUri"
string(17) "http://domain.com"