It is perfectly legal for an employer to hire your replacement before or without terminating you, then make the job as unpleasant as possible so you will leave voluntarily. If you do leave voluntarily, even if the workplace is "hostile," you will not be eligible for unemployment benefits--since there is no law saying that a workplace or supervisor cannot be hostile to employees, if you choose to leave as a result of this hostility, it will be a voluntary separation from employment and you will not be able to collect unemployment insurance.(The kind of "hostile workplace" that can lead to a wrongful termination or employment discrimination claim is one where the hostility is directed against you because you are a member of a protected category--for example, under federal law, because of your race, sex, religion, age over 40, or disability. However, if the hostility is not aimed at you because of a protected category--for example, your employer doesn't simply doesn't like you personally--it is legal.)Even if it's unpleasant, the best thing to do--unless you find a better job, of course--is probably to stick it out and not let it get under your skin. Look at it this way: every day you're there, you're making an employer who doesn't like you pay you a salary, even as he's also paying your ostensible "replacement"; and if he gives up and fires you, so long as it's not "for cause" (e.g. not for insubordination, violating company policies, excessive absenteeism, theft or other criminal act), you will then be eligible for unemployment.