Ted Cruz. Photo: Alex Wong/Getty Images

John Boehner probably isn’t the only member of Congress who’d like to curse out Ted Cruz on national television. The senator has been clamoring for another pointless government shutdown, this time over federal funding for Planned Parenthood, but on Monday night the Senate moved to keep the government funded — at least for the next few months.

Republicans and Democrats advanced a temporary spending measure that will keep government agencies operating at current spending levels through December 11, by a vote of 77 to 19. The Senate is expected to give the bill, which does not cut Planned Parenthood funding, final approval on Tuesday. The House would then have until midnight on Wednesday to approve the measure and send it to President Obama, keeping the government running.

The bill, which Senate Majority Leader Mitch McConnell set up last week, was expected to pass, and fellow senators weren’t very receptive to Cruz’s complaints after the fact. Politico reports that once the measure passed, Cruz tried to get a roll-call vote, a typical courtesy, but other Republicans shouted “no.” Only Mike Lee backed Cruz’s request, and it was overruled by McConnell and the rest of the GOP leadership.

Then the presidential candidate took to the floor to rail against the Senate leadership and share his theory for why Boehner is really stepping down as House speaker. He asserted that to avoid a shutdown, Boehner cut a deal with House Minority Leader Nancy Pelosi to push the continuing resolution through the House and continue funding various liberal initiatives. (Boehner and Pelosi say they have a shared interest in keeping the government open, but there’s no secret deal.)

“I believe if Speaker Boehner had done that … that he would have lost his speakership,” Cruz said. “And so what did he do? He announced that he is resigning as speaker and resigning as a member of Congress. That is unsurprising. But it also telegraphs the deal he just cut. It’s a deal to surrender and join with the Democrats. Notice he said he’s going to stay a month. He’s going to stay a month in order to join with the Democrats and fund Barack Obama’s priorities.”

Cruz spoke for an hour, then asked for permission to go beyond the time allotted by Senate rules. None of his fellow senators agreed. “The Democrats are objecting to my speaking further. And both the Democrats and Republican leadership are objecting to the American people speaking further. I yield the floor,” Cruz said, stepping away from the podium.

Despite his losses in the Senate on Monday, Cruz still sees a shutdown over Planned Parenthood as a winning issue. The continuing resolution will only push off the shutdown issue to December, and Boehner’s replacement may not be as willing or able to reach a resolution. Politico reports that the Cruz campaign thinks leading the battle over Planned Parenthood and the budget may be what helps push the candidate to the front of the Republican presidential race.

That may help Cruz win over tea party and evangelical voters, but it’s a risky strategy. A recent Quinnipiac University poll found that while 71 percent of Republicans support cutting off federal funding for Planned Parenthood, 56 percent oppose shutting down the government over the issue. Cruz told Politico that he’d be waging a war over the budget even if he wasn’t running for president, but he also pointed out that he’s the only candidate who’s actually fighting for conservative principles. “We’re having a battle right now on Planned Parenthood. Do you see any of the other men and women who were on that [debate] stage engaged in this battle?” Cruz said, sighing. “Not a one of them.”

This post has been updated throughout.