This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
/
FactoryTest.php
87 lines (72 loc) · 1.99 KB
/
FactoryTest.php
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php declare(strict_types=1);
namespace Sunrise\Http\Factory\Tests;
/**
* Import classes
*/
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Message\UploadedFileFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;
use Sunrise\Http\Factory\RequestFactory;
use Sunrise\Http\Factory\ResponseFactory;
use Sunrise\Http\Factory\ServerRequestFactory;
use Sunrise\Http\Factory\StreamFactory;
use Sunrise\Http\Factory\UploadedFileFactory;
use Sunrise\Http\Factory\UriFactory;
/**
* FactoryTest
*/
class FactoryTest extends TestCase
{
/**
* @return void
*/
public function testRequestFactory() : void
{
$factory = new RequestFactory();
$this->assertInstanceOf(RequestFactoryInterface::class, $factory);
}
/**
* @return void
*/
public function testResponseFactory() : void
{
$factory = new ResponseFactory();
$this->assertInstanceOf(ResponseFactoryInterface::class, $factory);
}
/**
* @return void
*/
public function testServerRequestFactory() : void
{
$factory = new ServerRequestFactory();
$this->assertInstanceOf(ServerRequestFactoryInterface::class, $factory);
}
/**
* @return void
*/
public function testStreamFactory() : void
{
$factory = new StreamFactory();
$this->assertInstanceOf(StreamFactoryInterface::class, $factory);
}
/**
* @return void
*/
public function testUploadedFileFactory() : void
{
$factory = new UploadedFileFactory();
$this->assertInstanceOf(UploadedFileFactoryInterface::class, $factory);
}
/**
* @return void
*/
public function testUriFactory() : void
{
$factory = new UriFactory();
$this->assertInstanceOf(UriFactoryInterface::class, $factory);
}
}