@@ 107-117 (lines=11) @@ | ||
104 | ]; |
|
105 | } |
|
106 | ||
107 | public function addTagProvider() |
|
108 | { |
|
109 | $tag1 = new Tag(Uuid::uuid4(), 'tag 1'); |
|
110 | $tag2 = new Tag(Uuid::uuid4(), 'tag 2'); |
|
111 | ||
112 | return [ |
|
113 | [[], $tag1, [$tag1], 'positive test, on null, first tag added'], |
|
114 | [[$tag1], $tag2, [$tag1, $tag2], 'positive test, adding a new tag to existing tag vector'], |
|
115 | [[$tag1, $tag2], $tag1, [$tag1, $tag2], 'negative test, tags should not be duplicated'] |
|
116 | ]; |
|
117 | } |
|
118 | ||
119 | public function removeTagProvider() |
|
120 | { |
|
@@ 119-129 (lines=11) @@ | ||
116 | ]; |
|
117 | } |
|
118 | ||
119 | public function removeTagProvider() |
|
120 | { |
|
121 | $tag1 = new Tag(Uuid::uuid4(), 'tag 1'); |
|
122 | $tag2 = new Tag(Uuid::uuid4(), 'tag 2'); |
|
123 | ||
124 | return [ |
|
125 | [[$tag1], $tag1, [], 'positive test, all tags removed'], |
|
126 | [[$tag1, $tag2], $tag1, [$tag2], 'positive test, removing one tag'], |
|
127 | [[$tag1], $tag2, [$tag1], 'negative test, removing non-existent tag'] |
|
128 | ]; |
|
129 | } |
|
130 | } |
|
131 |