diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php index 5180f7dd..37e137bf 100644 --- a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php | |||
@@ -18,8 +18,8 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
18 | 18 | ||
19 | public function setUp() | 19 | public function setUp() |
20 | { | 20 | { |
21 | $this->rulerz = $this->getRulerZMock(); | 21 | $this->rulerz = $this->getRulerZMock(); |
22 | $this->tagRepository = $this->getTagRepositoryMock(); | 22 | $this->tagRepository = $this->getTagRepositoryMock(); |
23 | $this->entryRepository = $this->getEntryRepositoryMock(); | 23 | $this->entryRepository = $this->getEntryRepositoryMock(); |
24 | 24 | ||
25 | $this->tagger = new RuleBasedTagger($this->rulerz, $this->tagRepository, $this->entryRepository); | 25 | $this->tagger = new RuleBasedTagger($this->rulerz, $this->tagRepository, $this->entryRepository); |
@@ -37,8 +37,8 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
37 | public function testTagWithNoMatchingRule() | 37 | public function testTagWithNoMatchingRule() |
38 | { | 38 | { |
39 | $taggingRule = $this->getTaggingRule('rule as string', array('foo', 'bar')); | 39 | $taggingRule = $this->getTaggingRule('rule as string', array('foo', 'bar')); |
40 | $user = $this->getUser([$taggingRule]); | 40 | $user = $this->getUser([$taggingRule]); |
41 | $entry = new Entry($user); | 41 | $entry = new Entry($user); |
42 | 42 | ||
43 | $this->rulerz | 43 | $this->rulerz |
44 | ->expects($this->once()) | 44 | ->expects($this->once()) |
@@ -54,8 +54,8 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
54 | public function testTagWithAMatchingRule() | 54 | public function testTagWithAMatchingRule() |
55 | { | 55 | { |
56 | $taggingRule = $this->getTaggingRule('rule as string', array('foo', 'bar')); | 56 | $taggingRule = $this->getTaggingRule('rule as string', array('foo', 'bar')); |
57 | $user = $this->getUser([$taggingRule]); | 57 | $user = $this->getUser([$taggingRule]); |
58 | $entry = new Entry($user); | 58 | $entry = new Entry($user); |
59 | 59 | ||
60 | $this->rulerz | 60 | $this->rulerz |
61 | ->expects($this->once()) | 61 | ->expects($this->once()) |
@@ -76,10 +76,10 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
76 | 76 | ||
77 | public function testTagWithAMixOfMatchingRules() | 77 | public function testTagWithAMixOfMatchingRules() |
78 | { | 78 | { |
79 | $taggingRule = $this->getTaggingRule('bla bla', array('hey')); | 79 | $taggingRule = $this->getTaggingRule('bla bla', array('hey')); |
80 | $otherTaggingRule = $this->getTaggingRule('rule as string', array('foo')); | 80 | $otherTaggingRule = $this->getTaggingRule('rule as string', array('foo')); |
81 | 81 | ||
82 | $user = $this->getUser([$taggingRule, $otherTaggingRule]); | 82 | $user = $this->getUser([$taggingRule, $otherTaggingRule]); |
83 | $entry = new Entry($user); | 83 | $entry = new Entry($user); |
84 | 84 | ||
85 | $this->rulerz | 85 | $this->rulerz |
@@ -98,9 +98,9 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
98 | public function testWhenTheTagExists() | 98 | public function testWhenTheTagExists() |
99 | { | 99 | { |
100 | $taggingRule = $this->getTaggingRule('rule as string', array('foo')); | 100 | $taggingRule = $this->getTaggingRule('rule as string', array('foo')); |
101 | $user = $this->getUser([$taggingRule]); | 101 | $user = $this->getUser([$taggingRule]); |
102 | $entry = new Entry($user); | 102 | $entry = new Entry($user); |
103 | $tag = new Tag($user); | 103 | $tag = new Tag($user); |
104 | 104 | ||
105 | $this->rulerz | 105 | $this->rulerz |
106 | ->expects($this->once()) | 106 | ->expects($this->once()) |
@@ -123,7 +123,7 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | |||
123 | 123 | ||
124 | private function getUser(array $taggingRules = []) | 124 | private function getUser(array $taggingRules = []) |
125 | { | 125 | { |
126 | $user = new User(); | 126 | $user = new User(); |
127 | $config = new Config($user); | 127 | $config = new Config($user); |
128 | 128 | ||
129 | $user->setConfig($config); | 129 | $user->setConfig($config); |