RequestMethodMappingTest::testIsValidMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the SF Forward Bundle.
5
 *
6
 * (c) DAOUDI Soufian <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace SfForward\Tests\Util;
13
14
use PHPUnit\Framework\TestCase;
15
use SfForward\Util\RequestMethodMapping;
16
17
class RequestMethodMappingTest extends TestCase
18
{
19
    /**
20
     * isValidMethod test.
21
     */
22
    public function testIsValidMethod()
23
    {
24
        $this->assertTrue(RequestMethodMapping::isValidMethod('post'));
25
        $this->assertTrue(RequestMethodMapping::isValidMethod('get'));
26
27
        $this->assertNotTrue(RequestMethodMapping::isValidMethod('put'));
28
        $this->assertNotTrue(RequestMethodMapping::isValidMethod('delete'));
29
        $this->assertNotTrue(RequestMethodMapping::isValidMethod('update'));
30
    }
31
}
32