+ public function testTagAllEntriesForAUser()
+ {
+ $taggingRule = $this->getTaggingRule('bla bla', ['hey']);
+
+ $user = $this->getUser([$taggingRule]);
+
+ $this->rulerz
+ ->method('satisfies')
+ ->willReturn(true);
+
+ $this->rulerz
+ ->method('filter')
+ ->willReturn([new Entry($user), new Entry($user)]);
+
+ $entries = $this->tagger->tagAllForUser($user);
+
+ $this->assertCount(2, $entries);
+
+ foreach ($entries as $entry) {
+ $tags = $entry->getTags();
+
+ $this->assertCount(1, $tags);
+ $this->assertEquals('hey', $tags[0]->getLabel());
+ }
+ }
+