J.W.
My daughter is 21 months and she does pretty good, but she occasionally tries to test us, but not too often. I'll just tell you what we do, and maybe it will work for you.
She goes to bed around 9:00 with an occasional give and take of a half hour. But the routine is always the same. Around 8:30 we will tell her it's time to get ready for bed, she usually says no, but we say, "I'm sorry sweetie, but you always get ready for bed at this time, and it's time". Then we ask her to come to the bedroom so she can pick out her pajamas. She really likes to pick them out, and that makes her want to wear them. Then we brush her teeth, which she hates, but she knows she has too and is getting less resistant, she really likes the part where we all say cheese smiling real big so her front teeth can be brushed. Then it's quiet time. We always watch TV after Kaylee goes to bed, so we just go ahead and turn it to one of our shows(she dosen't get sleepy if you watch cartoons). Turn out all the lights in the house, and she sits on our lap facing the TV holding her stuffed animal and blanket. Once 5-10 mins has passed and she is sleepier, I flip her around to lay on me, but that usually dosen't last long because she gets tired and wants to fight it when I hold her. So it's time to go to bed. Our secret to bed is a pillow. We recently put a pillow in her bed and she LOVES it. So I ask if she's ready to go to bed. She usually dosen't answer that. So I say do you want to go lay on your pillow in your bed, and she nods her head. Then she puts herself to sleep. Occasionally she will protest one or all of those things and we will say I'm sorry, but it's time to go to bed. And if she cries and comes to the door(we converted her crib to a toddler bed) I pick her up and take her back to her bed. If she needs a hug I will give her one, but my response is always the same.
I really hope all this in some way helps. Feel free to message me if you have more questions.