|
@@ 24-29 (lines=6) @@
|
| 21 |
|
{ |
| 22 |
|
$matcher = $this->buildMatcher(); |
| 23 |
|
|
| 24 |
|
foreach ($this->getEquals() as $prop => $given) { |
| 25 |
|
$property = static::getMockBuilder(\ReflectionProperty::class)->disableOriginalConstructor()->getMock(); |
| 26 |
|
$property->expects(static::any())->method('getName')->willReturn($prop); |
| 27 |
|
$msg = sprintf("property '%s' not match with '%s'", $prop, $given); |
| 28 |
|
static::assertTrue($matcher->match($property, $given), $msg); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
foreach ($this->getNotEquals() as $prop => $given) { |
| 32 |
|
$property = static::getMockBuilder(\ReflectionProperty::class)->disableOriginalConstructor()->getMock(); |
|
@@ 31-36 (lines=6) @@
|
| 28 |
|
static::assertTrue($matcher->match($property, $given), $msg); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
foreach ($this->getNotEquals() as $prop => $given) { |
| 32 |
|
$property = static::getMockBuilder(\ReflectionProperty::class)->disableOriginalConstructor()->getMock(); |
| 33 |
|
$property->expects(static::any())->method('getName')->willReturn($prop); |
| 34 |
|
$msg = sprintf("property '%s' match with '%s'", $prop, $given); |
| 35 |
|
static::assertFalse($matcher->match($property, $given), $msg); |
| 36 |
|
} |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
/** |