Completed
Pull Request — master (#48)
by John
02:30
created

ApiTestCaseTest::setUpBeforeClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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