Test Failed
Push — main ( 49ffe2...63a966 )
by Vedrana
07:24 queued 02:15
created

ProductRepositoryTest   A

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
7
use Doctrine\Persistence\ManagerRegistry;
8
use App\Repository\ProductRepository;
9
10
/**
11
* Test that the ProductRepository can be constructed properly.
12
*/
13
class ProductRepositoryTest extends TestCase
14
{
15
    /**
16
     * Test that the ProductRepository can be constructed properly.
17
     */
18
    public function testConstructProductRepository(): void
19
    {
20
        // Create a mock of the ManagerRegistry
21
22
        /** @var ManagerRegistry&\PHPUnit\Framework\MockObject\MockObject $registry */
23
        $registry = $this->createMock(ManagerRegistry::class);
24
25
        $repository = new ProductRepository($registry);
26
27
        $this->assertInstanceOf("\App\Repository\ProductRepository", $repository);
28
    }
29
}
30