| @@ 634-652 (lines=19) @@ | ||
| 631 | $extracted = array(); |
|
| 632 | foreach($dataObjectSet as $item) $extracted[] = $item->toMap(); |
|
| 633 | ||
| 634 | foreach($matches as $match) { |
|
| 635 | $matched = false; |
|
| 636 | foreach($extracted as $i => $item) { |
|
| 637 | if($this->dataObjectArrayMatch($item, $match)) { |
|
| 638 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 639 | unset($extracted[$i]); |
|
| 640 | $matched = true; |
|
| 641 | break; |
|
| 642 | } |
|
| 643 | } |
|
| 644 | ||
| 645 | // We couldn't find a match - assertion failed |
|
| 646 | $this->assertTrue( |
|
| 647 | $matched, |
|
| 648 | "Failed asserting that the SS_List contains an item matching " |
|
| 649 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 650 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 651 | ); |
|
| 652 | } |
|
| 653 | } |
|
| 654 | ||
| 655 | /** |
|
| @@ 684-702 (lines=19) @@ | ||
| 681 | ||
| 682 | // Check all matches |
|
| 683 | if($matches) { |
|
| 684 | foreach ($matches as $match) { |
|
| 685 | $matched = false; |
|
| 686 | foreach ($extracted as $i => $item) { |
|
| 687 | if ($this->dataObjectArrayMatch($item, $match)) { |
|
| 688 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 689 | unset($extracted[$i]); |
|
| 690 | $matched = true; |
|
| 691 | break; |
|
| 692 | } |
|
| 693 | } |
|
| 694 | ||
| 695 | // We couldn't find a match - assertion failed |
|
| 696 | $this->assertTrue( |
|
| 697 | $matched, |
|
| 698 | "Failed asserting that the SS_List contains an item matching " |
|
| 699 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 700 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 701 | ); |
|
| 702 | } |
|
| 703 | } |
|
| 704 | ||
| 705 | // If we have leftovers than the DOS has extra data that shouldn't be there |
|