function testEnvironmentAnonymousLookup() { session_id('deadbeef01234567'); $lib = new RatingLib(); $this->assertTrue($lib->record_vote('test', '123', 2)); $this->assertEquals(array(array('user' => "anonymousdeadbeef01234567", 'id' => 'test.123', 'optionId' => 2)), $this->getTestData()); $this->assertEquals(2.0, $lib->get_vote('test', '123')); }