Created
December 4, 2013 11:18
-
-
Save johannesnagl/7785994 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('Group', 'Model'); | |
class GroupTest extends CakeTestCase { | |
public $fixtures = array('app.group', 'app.groupsUser', 'app.channelsClient', 'app.client'); | |
public $autoFixtures = false; | |
public function setUp() { | |
parent::setUp(); | |
$this->Group = ClassRegistry::init('Group'); | |
} | |
public function testGetChannelCount() { | |
$this->loadFixtures('Group', 'ChannelsClient', 'Client'); | |
$result = $this->Group->getChannelCount(1); | |
$this->assertEquals(1, $result); | |
$result = $this->Group->getChannelCount(2); | |
$this->assertEquals(0, $result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment