/** tests appendStringIfNot function */ public function testAppendStringIfNot() { // try one that doesn't have the suffix: $subject = 'blah'; $ext = '.exe'; $subject = KWUtils::appendStringIfNot($subject, $ext); $this->assertEquals($subject, 'blah.exe'); // now try one that already has the suffix $subject = 'blah'; $ext = '.exe'; $subject = KWUtils::appendStringIfNot($subject, $ext); $this->assertEquals($subject, 'blah.exe'); }