You are here

private function TagadelicCloudTest::addTagStub in Tagadelic 7.2

Creates a stub for a tag

5 calls to TagadelicCloudTest::addTagStub()
TagadelicCloudTest::setUp in tests/TagadelicCloudTest.php
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
TagadelicCloudTest::testNotSorted in tests/TagadelicCloudTest.php
Default is not sorted
TagadelicCloudTest::testSortByCount in tests/TagadelicCloudTest.php
Sort by count. Highest count first.
TagadelicCloudTest::testSortByName in tests/TagadelicCloudTest.php
Sort By name
TagadelicCloudTest::testSortByNameWithInternationalCharacters in tests/TagadelicCloudTest.php
Sort By name should sort International characters like ÅÄÖABO

File

tests/TagadelicCloudTest.php, line 288

Class

TagadelicCloudTest
Generated by PHPUnit_SkeletonGenerator on 2012-05-16 at 15:23:33.

Code

private function addTagStub($id, $name, $count) {
  $stub = $this
    ->getMock("TagadelicTag", array(
    "get_name",
    "get_count",
    "set_weight",
  ), array(
    $id,
    $name,
    $count,
  ));
  $stub
    ->expects($this
    ->any())
    ->method("get_name")
    ->will($this
    ->returnValue($name));
  $stub
    ->expects($this
    ->any())
    ->method("get_count")
    ->will($this
    ->returnValue($count));
  $this->mock_tags[$id] = $stub;
  return $stub;
}