| @@ 749-767 (lines=19) @@ | ||
| 746 | $extracted[] = $object->toMap(); |
|
| 747 | } |
|
| 748 | ||
| 749 | foreach ($matches as $match) { |
|
| 750 | $matched = false; |
|
| 751 | foreach ($extracted as $i => $item) { |
|
| 752 | if ($this->dataObjectArrayMatch($item, $match)) { |
|
| 753 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 754 | unset($extracted[$i]); |
|
| 755 | $matched = true; |
|
| 756 | break; |
|
| 757 | } |
|
| 758 | } |
|
| 759 | ||
| 760 | // We couldn't find a match - assertion failed |
|
| 761 | $this->assertTrue( |
|
| 762 | $matched, |
|
| 763 | "Failed asserting that the SS_List contains an item matching " |
|
| 764 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 765 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 766 | ); |
|
| 767 | } |
|
| 768 | } |
|
| 769 | /** |
|
| 770 | * Asserts that no items in a given list appear in the given dataobject list |
|
| @@ 844-862 (lines=19) @@ | ||
| 841 | ||
| 842 | // Check all matches |
|
| 843 | if ($matches) { |
|
| 844 | foreach ($matches as $match) { |
|
| 845 | $matched = false; |
|
| 846 | foreach ($extracted as $i => $item) { |
|
| 847 | if ($this->dataObjectArrayMatch($item, $match)) { |
|
| 848 | // Remove it from $extracted so that we don't get duplicate mapping. |
|
| 849 | unset($extracted[$i]); |
|
| 850 | $matched = true; |
|
| 851 | break; |
|
| 852 | } |
|
| 853 | } |
|
| 854 | ||
| 855 | // We couldn't find a match - assertion failed |
|
| 856 | $this->assertTrue( |
|
| 857 | $matched, |
|
| 858 | "Failed asserting that the SS_List contains an item matching " |
|
| 859 | . var_export($match, true) . "\n\nIn the following SS_List:\n" |
|
| 860 | . $this->DOSSummaryForMatch($dataObjectSet, $match) |
|
| 861 | ); |
|
| 862 | } |
|
| 863 | } |
|
| 864 | ||
| 865 | // If we have leftovers than the DOS has extra data that shouldn't be there |
|