CorsMiddlewareTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
eloc 5
c 2
b 0
f 1
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A check_access_origin() 0 6 1
1
<?php
2
3
namespace TobyMaxham\Helper\Tests;
4
5
class CorsMiddlewareTest extends TestCase
6
{
7
    /** @test */
8
    public function check_access_origin()
9
    {
10
        config(['tma-helper.cors.allowedOrigins' => ['localhost']]);
11
        $crawler = $this->call('GET', 'api/ping');
12
        $this->assertEquals('localhost', $crawler->headers->get('Access-Control-Allow-Origin'));
13
        $this->assertEquals(200, $crawler->getStatusCode());
14
    }
15
}
16