A former McDonald's worker in California who is accused of spitting on a hamburger that was served to a uniformed police officer will stand trial, a judge ruled.

Tatyana Hargrove was arrested in November 2019 and faces a felony charge of willfully poisoning food, online court records show.

Prosecutors allege that while working at a McDonald's in Bakersfield the then-21-year-old rubbed a hamburger bun on the floor and then spat on it as she prepared a meal for a city police officer at the drive-thru, NBC affiliate KGET reported.

She also allegedly shouted, "Black lives matter" and referred to officers as "pigs," according to the outlet.

The officer did not get sick from eating the burger and did not seek medical treatment.

A judge dismissed an earlier misdemeanor battery charge but at a hearing on Thursday ordered her to go on trial for the felony count. Her arraignment is scheduled for March 23.

Hargrove's attorney, Lexi Blythe, argued that there isn't enough evidence against her client because her back was to the camera while she was making the officer's order, KGET reported. Blythe also said it's not known if cleaning products had recently been used on the floor.

Prosecutor Gina Pearl told the judge that one of Hargrove's coworkers said they heard her draw saliva into her mouth as she was making the food. Video also caught Hargrove wiping her mouth afterward, Pearl said.

Prior to the November 2019 incident, Hargrove had filed a federal lawsuit against the Bakersfield Police Department alleging that she was beaten and arrested in 2017 by two officers while riding her bicycle.

The suit says that one of the officers approached Hargrove with his gun drawn although she had done nothing wrong. The officer proceeded to question Hargrove about where she had been and demanded she turn over her backpack, which she refused to do after asking the officer if he had a warrant.

The two police officers "violently retaliated," according to the lawsuit. One of them snatched Hargrove off her bike and punched her, the suit says. The other officer allegedly released his K-9 dog on Hargrove. The girl screamed for help as the dog bit her in the leg, the lawsuit claims.

"Even though she was completely innocent of a crime, Hargrove was maliciously arrested and detained overnight," it says. The case went to trial, and a jury ruled in favor of the City of Bakersfield.

tag