ProductRepositoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructProductRepository() 0 10 1
1
<?php
2
3
namespace App\Tests\Repository;
4
5
use PHPUnit\Framework\TestCase;
6
use Doctrine\Persistence\ManagerRegistry;
7
use App\Repository\ProductRepository;
8
9
/**
10
* Test that the ProductRepository can be constructed properly.
11
*/
12
class ProductRepositoryTest extends TestCase
13
{
14
    /**
15
     * Test that the ProductRepository can be constructed properly.
16
     */
17
    public function testConstructProductRepository(): void
18
    {
19
        // Create a mock of the ManagerRegistry
20
21
        /** @var ManagerRegistry&\PHPUnit\Framework\MockObject\MockObject $registry */
22
        $registry = $this->createMock(ManagerRegistry::class);
23
24
        $repository = new ProductRepository($registry);
25
26
        $this->assertInstanceOf("\App\Repository\ProductRepository", $repository);
27
    }
28
}
29