| @@ 741-759 (lines=19) @@ | ||
| 738 | $extracted[] = $object->toMap(); |
|
| 739 | } |
|
| 740 | ||
| 741 | foreach ($matches as $match) { |
|
| 742 | $matched = false; |
|
| 743 | foreach ($extracted as $i => $item) { |
|
| 744 | if ($this->dataObjectArrayMatch($item, $match)) { |
|
| 745 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 746 | unset($extracted[$i]); |
|
| 747 | $matched = true; |
|
| 748 | break; |
|
| 749 | } |
|
| 750 | } |
|
| 751 | ||
| 752 | // We couldn't find a match - assertion failed |
|
| 753 | $this->assertTrue( |
|
| 754 | $matched, |
|
| 755 | "Failed asserting that the SS_List contains an item matching " |
|
| 756 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 757 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 758 | ); |
|
| 759 | } |
|
| 760 | } |
|
| 761 | /** |
|
| 762 | * Asserts that no items in a given list appear in the given dataobject list |
|
| @@ 836-854 (lines=19) @@ | ||
| 833 | ||
| 834 | // Check all matches |
|
| 835 | if ($matches) { |
|
| 836 | foreach ($matches as $match) { |
|
| 837 | $matched = false; |
|
| 838 | foreach ($extracted as $i => $item) { |
|
| 839 | if ($this->dataObjectArrayMatch($item, $match)) { |
|
| 840 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 841 | unset($extracted[$i]); |
|
| 842 | $matched = true; |
|
| 843 | break; |
|
| 844 | } |
|
| 845 | } |
|
| 846 | ||
| 847 | // We couldn't find a match - assertion failed |
|
| 848 | $this->assertTrue( |
|
| 849 | $matched, |
|
| 850 | "Failed asserting that the SS_List contains an item matching " |
|
| 851 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 852 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 853 | ); |
|
| 854 | } |
|
| 855 | } |
|
| 856 | ||
| 857 | // If we have leftovers than the DOS has extra data that shouldn't be there |
|