/** * Test saving settings without saving any children * @covers BBTournament::save_settings */ public function test_save_settings() { $this->get_tournament_new(); $this->object->title = 'changed'; $team = $this->object->team(); $team1 = $this->object->team(); $team2 = $this->object->team(); $this->assertSave($this->object->save_settings()); //Should still be flagged as changed, since it has changed children $this->assertTrue($this->object->changed); //Make sure none of the teams were saved $this->assertNull($team->id); $this->assertNull($team1->id); $this->assertNull($team2->id); //Now reset to clean up $this->object->reset(); }