private function getTestUser() { $testUser = new User(); $testUser->setUserName('testUsername'); $testUser->setTime(123456); $testUser->setLatitude(111.11); $testUser->setLongitude(222.22); $testUser->setAltitude(333.33); $testUser->setSpeed(444.44); $testUser->setAccuracy(100); $testUser->setHash('someHash'); return $testUser; }
public function testGettersAndSetters() { $user = new User(); $user->setUserName('Username'); $user->setTime('123456'); $user->setLatitude(111.11); $user->setLongitude(222.22); $user->setAltitude(333.33); $user->setSpeed(444.44); $user->setAccuracy(100); $user->setHash('someHash'); $this->assertSame('Username', $user->getUserName()); $this->assertSame('123456', $user->getTime()); $this->assertSame(111.11, $user->getLatitude()); $this->assertSame(222.22, $user->getLongitude()); $this->assertSame(333.33, $user->getAltitude()); $this->assertSame(444.44, $user->getSpeed()); $this->assertSame(100, $user->getAccuracy()); $this->assertSame('someHash', $user->getHash()); }