/** * @covers BBTournament::generate_player_password */ public function test_generate_player_password() { $this->get_tournament_new(); //Should be the default null value $this->assertNull($this->object->player_password); //Generate a random password! $this->object->generate_player_password(); //Should now be a string, of exactly 13 characters (from unique id) $this->assertTrue(strlen($this->object->player_password) == 13); }