chore: code cleanup with rector and php-cs-fixer
This commit is contained in:
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Service;
|
||||
|
||||
use Symfony\Component\Validator\ConstraintViolationListInterface;
|
||||
use Symfony\Component\Validator\ConstraintViolationInterface;
|
||||
use Symfony\Component\Validator\ConstraintViolationList;
|
||||
use App\BusProNet\Model\Room;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use App\Form\Model\BookingDto;
|
||||
@@ -384,7 +387,7 @@ class ParticipantCardAssemblerTest extends TestCase
|
||||
->willReturn([450.50]);
|
||||
|
||||
// Mock validator to return no violations (valid)
|
||||
$violations = $this->createMock(\Symfony\Component\Validator\ConstraintViolationListInterface::class);
|
||||
$violations = $this->createMock(ConstraintViolationListInterface::class);
|
||||
$violations->expects($this->once())
|
||||
->method('count')
|
||||
->willReturn(0);
|
||||
@@ -422,13 +425,13 @@ class ParticipantCardAssemblerTest extends TestCase
|
||||
->willReturn([0.0]);
|
||||
|
||||
// Mock validator to return violations (invalid)
|
||||
$violation = $this->createMock(\Symfony\Component\Validator\ConstraintViolationInterface::class);
|
||||
$violation = $this->createMock(ConstraintViolationInterface::class);
|
||||
$violation->expects($this->once())
|
||||
->method('getMessage')
|
||||
->willReturn('Diese E-Mail Adresse wird bereits von einem anderen Teilnehmer verwendet');
|
||||
|
||||
// Use ConstraintViolationList directly instead of mocking
|
||||
$violations = new \Symfony\Component\Validator\ConstraintViolationList([$violation]);
|
||||
$violations = new ConstraintViolationList([$violation]);
|
||||
|
||||
$this->validator
|
||||
->expects($this->once())
|
||||
@@ -473,7 +476,7 @@ class ParticipantCardAssemblerTest extends TestCase
|
||||
->willReturn([450.0, 500.0]);
|
||||
|
||||
// Mock validator to return no violations for both participants
|
||||
$violations = $this->createMock(\Symfony\Component\Validator\ConstraintViolationListInterface::class);
|
||||
$violations = $this->createMock(ConstraintViolationListInterface::class);
|
||||
$violations->expects($this->exactly(2))
|
||||
->method('count')
|
||||
->willReturn(0);
|
||||
|
||||
Reference in New Issue
Block a user