Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function testCreate(): void |
||
16 | { |
||
17 | $expected = new ParsleyAssert\Required(); |
||
18 | |||
19 | $requiredFactory = $this->createMock(RequiredFactory::class); |
||
20 | $requiredFactory |
||
21 | ->expects($this->once()) |
||
22 | ->method('supports') |
||
23 | ->willReturn(true) |
||
24 | ; |
||
25 | $requiredFactory |
||
26 | ->expects($this->once()) |
||
27 | ->method('create') |
||
28 | ->willReturn($expected) |
||
29 | ; |
||
30 | |||
31 | $factory = $this->createFactory([ |
||
32 | $requiredFactory, |
||
33 | ]); |
||
34 | |||
35 | $constraint = $factory->create(new Assert\NotBlank()); |
||
36 | $this->assertSame($expected, $constraint); |
||
37 | } |
||
63 |