示例#1
0
 /**
  * Test friendly track name
  */
 public function testFriendlyTrackName()
 {
     // Init new track
     $track = new Track();
     // Set names
     $track->setVenue('Sebring [Virtua_LM]');
     $track->setCourse('Sebring 12h Course ( /1 # `');
     // Set (, /, #, ` chars
     // to test for regex
     // errors that
     // previously occured
     $track->setEvent('12h Course');
     // Validate friendly name
     $this->assertSame('Sebring [Virtua_LM], Sebring 12h Course ( /1 # `', $track->getFriendlyName());
     // Change event name
     $track->setEvent('12h Alternative course');
     // Validate friendly name
     $this->assertSame('Sebring [Virtua_LM], Sebring 12h Course ( /1 # ` (12h Alternative course)', $track->getFriendlyName());
 }