Completed
Push — master ( 1bdade...d7c1bf )
by Jordi Sala
12s
created

PHPUnit_Framework_TestCase::createMock()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\NewsBundle\Tests;
13
14
/**
15
 * NEXT_MAJOR: Remove this class when dropping support for < PHPUnit 5.4.
16
 *
17
 * @internal
18
 */
19
class PHPUnit_Framework_TestCase extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style introduced by
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
20
{
21
    /**
22
     * @param string $class
23
     *
24
     * @return \PHPUnit_Framework_MockObject_MockObject
25
     */
26
    protected function createMock($class)
27
    {
28
        if (is_callable('parent::createMock')) {
29
            return parent::createMock($class);
30
        }
31
32
        return $this->getMock($class);
33
    }
34
}
35