Completed
Push — master ( d2c88c...854f25 )
by Rafael
03:52
created

ClassUtilsTest::testRelatedBundleNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Test\Util;
12
13
use PHPUnit\Framework\TestCase;
14
use Ynlo\GraphQLBundle\Util\ClassUtils;
15
16
class ClassUtilsTest extends TestCase
17
{
18
19
    public function testRelatedBundleNamespace()
20
    {
21
        self::assertEquals('AppBundle', ClassUtils::relatedBundleNamespace('AppBundle\Entity\User'));
22
        self::assertEquals('AppBundle', ClassUtils::relatedBundleNamespace('AppBundle\User'));
23
        self::assertEquals('Ynlo\GraphQLBundle\Demo\AppBundle', ClassUtils::relatedBundleNamespace('Ynlo\GraphQLBundle\Demo\AppBundle\Test'));
24
        self::assertEquals('AppBundle', ClassUtils::relatedBundleNamespace('AppBundle\Test\HelloBundleName'));
25
    }
26
}
27