Completed
Push — master ( 658d5b...f22fae )
by John
02:32
created

ApiTestCaseTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUpBeforeClass() 0 4 1
A notFoundApiCallThrowsException() 0 4 1
1
<?php
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\SwaggerBundle\Tests\Functional;
10
11
use KleijnWeb\SwaggerBundle\Test\ApiTestCase;
12
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class ApiTestCaseTest extends WebTestCase
18
{
19
    use ApiTestCase;
20
21
    /**
22
     * Use config_basic.yml
23
     *
24
     * @var bool
25
     */
26
    protected $env = 'basic';
27
28
    public static function setUpBeforeClass()
29
    {
30
        static::initSchemaManager(__DIR__ . '/PetStore/app/swagger/petstore.yml');
31
    }
32
33
    /**
34
     * @test
35
     * @expectedException \KleijnWeb\SwaggerBundle\Test\ApiResponseErrorException
36
     */
37
    public function notFoundApiCallThrowsException()
38
    {
39
        $this->get('/foo');
40
    }
41
}
42