GroupId = new GroupId('all', 1); } /** * Cleans up the environment after running a test. */ protected function tearDown() { $this->GroupId = null; parent::tearDown(); } /** * Constructs the test case. */ public function __construct() {} /** * Tests GroupId->__construct() */ public function test__construct() { $this->GroupId->__construct('all', 1); } /** * Tests GroupId->getGroupId() */ public function testGetGroupId() { $this->assertEquals(1, $this->GroupId->getGroupId()); } /** * Tests GroupId->getType() */ public function testGetType() { $this->assertEquals('all', $this->GroupId->getType()); } /** * Tests GroupId->fromJson() */ public function testFromJson() { $json = 'jsonid'; $fromJson = $this->GroupId->fromJson($json); $this->assertEquals('groupId', $fromJson->getType()); $this->assertEquals('jsonid', $fromJson->getGroupId()); } }