Browse files

Test expected weights.

  • Loading branch information...
1 parent 378fbc0 commit a35e5ec028c14053062f88b83aee01119e2483b0 Bèr Kessels committed Dec 31, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/TagadelicCloudTest.php
View
7 tests/TagadelicCloudTest.php
@@ -107,9 +107,16 @@ public function testFrom_cache() {
* Get Tags should calculate the weights
*/
public function testGetCalculatedTags() {
+ $index = 0;
+ $expected_weights = array(1.0, 6.0);
+
foreach ($this->mock_tags as $mock_tag) {
+ $weight = $expected_weights[$index];
+ $index++;
+
$mock_tag->expects($this->once())
->method('set_weight')
+ ->with($this->equalTo($weight))
->will($this->returnSelf());
$mocks[] = $mock_tag;
}

0 comments on commit a35e5ec

Please sign in to comment.