public function testContactsUtilGetAndSetStartingStateById() { $expectedStartingStateId = ContactsUtil::getStartingState()->id; $contactStates = ContactState::getAll(); foreach ($contactStates as $contactState) { if ($contactState->id != $expectedStartingStateId) { $otherStateId = $contactState->id; break; } } $startingStateId = ContactsUtil::getStartingStateId(); $this->assertEquals($expectedStartingStateId, $startingStateId); ContactsUtil::setStartingStateById($otherStateId); $startingStateId = ContactsUtil::getStartingStateId(); $this->assertEquals($otherStateId, $startingStateId); }