|
@@ 14-20 (lines=7) @@
|
| 11 |
|
* @see https://github.com/phpspec/prophecy/issues/268 |
| 12 |
|
* @see https://stackoverflow.com/a/19097159/2424814 |
| 13 |
|
*/ |
| 14 |
|
public function does_not_trigger_nesting_error() { |
| 15 |
|
$child1 = new ChildClass('A', new ParentClass()); |
| 16 |
|
$child2 = new ChildClass('B', new ParentClass()); |
| 17 |
|
|
| 18 |
|
$exactValueToken = new ExactValueToken($child1); |
| 19 |
|
self::assertEquals(false, $exactValueToken->scoreArgument($child2)); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
/** |
| 23 |
|
* @test |
|
@@ 25-31 (lines=7) @@
|
| 22 |
|
/** |
| 23 |
|
* @test |
| 24 |
|
*/ |
| 25 |
|
public function scores_10_for_objects_with_same_fields() { |
| 26 |
|
$child1 = new ChildClass('A', new ParentClass()); |
| 27 |
|
$child2 = new ChildClass('A', new ParentClass()); |
| 28 |
|
|
| 29 |
|
$exactValueToken = new ExactValueToken($child1); |
| 30 |
|
self::assertEquals(10, $exactValueToken->scoreArgument($child2)); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
/** |
| 34 |
|
* @test |