File: RequestMethodInterfaceTest.php

package info (click to toggle)
php-fig-http-message-util 1.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 112 kB
  • sloc: php: 178; makefile: 9
file content (29 lines) | stat: -rw-r--r-- 1,130 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
26
27
28
29
<?php

declare(strict_types = 1);

use \PHPUnit\Framework\TestCase;
use \Fig\Http\Message\RequestMethodInterface;

class RequestMethodInterfaceImpl implements RequestMethodInterface {

}

class RequestMethodInterfaceTest extends TestCase
{

    public function testImplementation(): void
    {
        $impl = new RequestMethodInterfaceImpl();
        $this->assertSame('HEAD', RequestMethodInterfaceImpl::METHOD_HEAD);
        $this->assertSame('GET', RequestMethodInterfaceImpl::METHOD_GET);
        $this->assertSame('POST', RequestMethodInterfaceImpl::METHOD_POST);
        $this->assertSame('PUT', RequestMethodInterfaceImpl::METHOD_PUT);
        $this->assertSame('PATCH', RequestMethodInterfaceImpl::METHOD_PATCH);
        $this->assertSame('DELETE', RequestMethodInterfaceImpl::METHOD_DELETE);
        $this->assertSame('PURGE', RequestMethodInterfaceImpl::METHOD_PURGE);
        $this->assertSame('OPTIONS', RequestMethodInterfaceImpl::METHOD_OPTIONS);
        $this->assertSame('TRACE', RequestMethodInterfaceImpl::METHOD_TRACE);
        $this->assertSame('CONNECT', RequestMethodInterfaceImpl::METHOD_CONNECT);
    }
}