Completed
Push — master ( 791ec7...10a83e )
by Oleg
06:09
created

TestCase::expectException()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
namespace Malezha\Menu\Tests;
3
4
use Malezha\Menu\MenuFacade;
5
use Malezha\Menu\MenuServiceProvider;
6
use Orchestra\Testbench\TestCase as OrchestraTestCase;
7
8
/**
9
 * Class TestCase
10
 * @package Malezha\Menu\Tests
11
 */
12
class TestCase extends OrchestraTestCase
13
{
14
    protected function getPackageProviders($app)
15
    {
16
        return [MenuServiceProvider::class];
17
    }
18
19
    protected function getPackageAliases($app)
20
    {
21
        return ['Menu' => MenuFacade::class];
22
    }
23
24
    public function expectException($exception)
25
    {
26
        if (version_compare(\PHPUnit_Runner_Version::id(), '5.2', '>=')) {
27
            parent::expectException($exception);
28
        } else {
29
            $this->setExpectedException($exception);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
30
        }
31
    }
32
}