/** * Test eliminated_by to make sure it accurately returns null to indicate * that the team is currently waiting on an opponent * * @covers BBTeam::eliminated_by */ public function test_eliminated_by_waiting() { $this->set_object_with_open_match(); //Make sure that $team wins, so his next match won't have an opponent yet $this->assertInstanceOf('BBMatch', $match = $this->object->match()); $this->assertTrue($match->set_winner($this->object)); $this->assertSave($match->report()); //Eliminated!! $this->assertFalse($this->object->eliminated_by()); }