GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#63)
by joseph
03:18
created

itCanHandleTheWordStaffForPluralAndSingular()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta;
4
5
use PHPUnit\Framework\TestCase;
6
7
/**
8
 * @SuppressWarnings(PHPMD.StaticAccess)
9
 */
10
class MappingHelperTest extends TestCase
11
{
12
    public function testGetTableNameForEntityFqn()
13
    {
14
        $expected  = '`bar_baz`';
15
        $entityFqn = '\\DSM\\Test\\Project\\Entities\\Bar\\Baz';
16
        $actual    = MappingHelper::getTableNameForEntityFqn($entityFqn);
17
        $this->assertSame($expected, $actual);
18
    }
19
20
    public function testGetColumnName()
21
    {
22
        $fieldNamesToExpectedColumnNames = [
23
            'test'                   => '`test`',
24
            'longThingWithCamelCase' => '`long_thing_with_camel_case`',
25
        ];
26
        foreach ($fieldNamesToExpectedColumnNames as $field => $expected) {
27
            $actual = MappingHelper::getColumnNameForField($field);
28
            $this->assertSame($expected, $actual);
29
        }
30
    }
31
32
    /**
33
     * @test
34
     * @small
35
     */
36
    public function itCanHandleTheWordStaffForPluralAndSingular()
37
    {
38
        $entityFqn = '\\Test\\Project\\Entity\\Staff';
39
        $plural    = MappingHelper::getPluralForFqn($entityFqn);
40
        $singular  = MappingHelper::getSingularForFqn($entityFqn);
41
        $this->assertNotSame($plural, $singular);
42
    }
43
}
44