Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HttpMethodMapTest.php
Go to the documentation of this file.
1 <?php
7 declare(strict_types=1);
8 
10 
12 use PHPUnit\Framework\TestCase;
13 
14 class HttpMethodMapTest extends TestCase
15 {
19  public function testFilter()
20  {
21  $map = new HttpMethodMap(
22  ['method1' => '\\Throwable', 'method2' => 'DateTime']
23  );
24  $this->assertEquals(
25  ['method1' => \Throwable::class, 'method2' => \DateTime::class],
26  $map->getMap()
27  );
28  }
29 
35  public function testExisting()
36  {
37  new HttpMethodMap(['method1' => 'NonExistingClass']);
38  }
39 
45  public function testMethod()
46  {
47  new HttpMethodMap([\Throwable::class]);
48  }
49 }