Skip to content

Commit cbe5892

Browse files
committed
Remove SpecificationRepository and old phpspec settings
1 parent 28050fd commit cbe5892

File tree

5 files changed

+25
-39
lines changed

5 files changed

+25
-39
lines changed

phpspec.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
suites:
2+
main:
3+
namespace: Purist\Specification\Doctrine
4+
psr4_prefix: Purist\Specification\Doctrine

phpspec.yml.dist

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace spec\Purist\Specification\Doctrine;
6+
7+
use Doctrine\ORM\EntityManagerInterface;
8+
use Doctrine\ORM\EntityRepository;
9+
use Doctrine\ORM\Mapping\ClassMetadata;
10+
use Purist\Specification\Doctrine\SpecificationRepositoryTrait;
11+
12+
class SpecificationRepositoryDouble extends EntityRepository
13+
{
14+
use SpecificationRepositoryTrait;
15+
16+
public function __construct(EntityManagerInterface $em, ClassMetadata $class)
17+
{
18+
parent::__construct($em, $class);
19+
}
20+
}

spec/SpecificationRepositorySpec.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@
1111
use Purist\Specification\Doctrine\Exception\LogicException;
1212
use Purist\Specification\Doctrine\Result\ModifierInterface;
1313
use Purist\Specification\Doctrine\SpecificationInterface;
14-
use Purist\Specification\Doctrine\SpecificationRepository;
1514

1615
class SpecificationRepositorySpec extends ObjectBehavior
1716
{
1817
private string $dqlAlias = 'e';
19-
2018
private string $expression = 'expr';
21-
2219
private string $result = 'result';
2320

2421
public function let(EntityManager $entityManager, ClassMetadata $classMetadata): void
2522
{
2623
$classMetadata->name = 'foo';
27-
$this->beAnInstanceOf(SpecificationRepository::class);
24+
$this->beAnInstanceOf(SpecificationRepositoryDouble::class);
2825
$this->beConstructedWith($entityManager, $classMetadata);
2926
}
3027

src/SpecificationRepository.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)