aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
commit347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e (patch)
tree23c7c5cee6aefbbf8ec058ac99f4729c7be4ac3e /src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
parentc5d0db8b71a8c1bb6b5c08763b44e14b4f876d06 (diff)
downloadwallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.gz
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.zst
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.zip
php cs
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php24
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);