• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 10639694367

30 Aug 2024 10:03PM UTC coverage: 7.667% (+0.7%) from 6.957%
10639694367

push

github

web-flow
Merge 3.4

Merge 3.4

0 of 165 new or added lines in 5 files covered. (0.0%)

7500 existing lines in 290 files now uncovered.

12514 of 163211 relevant lines covered (7.67%)

22.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Metadata/Tests/Util/ClassInfoTraitTest.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
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
declare(strict_types=1);
13

14
namespace ApiPlatform\Metadata\Tests\Util;
15

16
use ApiPlatform\Metadata\Util\ClassInfoTrait;
17
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy;
18
use PHPUnit\Framework\TestCase;
19

20
class ClassInfoTraitTest extends TestCase
21
{
22
    private function getClassInfoTraitImplementation()
23
    {
NEW
24
        return new class {
×
25
            use ClassInfoTrait {
26
                ClassInfoTrait::getRealClassName as public;
27
            }
NEW
28
        };
×
29
    }
30

31
    public function testDoctrineRealClassName(): void
32
    {
NEW
33
        $classInfo = $this->getClassInfoTraitImplementation();
×
34

NEW
35
        $this->assertSame(Dummy::class, $classInfo->getRealClassName('Proxies\__CG__\ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy'));
×
36
    }
37

38
    public function testProxyManagerRealClassName(): void
39
    {
NEW
40
        $classInfo = $this->getClassInfoTraitImplementation();
×
41

NEW
42
        $this->assertSame(Dummy::class, $classInfo->getRealClassName('MongoDBODMProxies\__PM__\ApiPlatform\Tests\Fixtures\TestBundle\Entity\Dummy\Generated'));
×
43
    }
44

45
    public function testUnmarkedRealClassName(): void
46
    {
NEW
47
        $classInfo = $this->getClassInfoTraitImplementation();
×
48

NEW
49
        $this->assertSame(Dummy::class, $classInfo->getRealClassName(Dummy::class));
×
50
    }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc