Beispiel #1
0
 public function testGetWords()
 {
     $this->assertEquals(array('test', 'case'), StringFormat::getWords('test case'));
     $this->assertEquals(array('test', 'Case'), StringFormat::getWords('testCase'));
     $this->assertEquals(array('test', 'case'), StringFormat::getWords('test_case'));
     $this->assertEquals(array('test', 'case'), StringFormat::getWords('test-case'));
     $this->assertEquals(array('my', 'ID'), StringFormat::getWords('myID'));
     $this->assertEquals(array('RU4', 'real'), StringFormat::getWords('RU4real'));
     $this->assertEquals(array('5', '14', '1985'), StringFormat::getWords("5'14'1985"));
     $this->assertEquals(array('who', 'me', 'yes', 'you', 'couldnt', 'be'), StringFormat::getWords(" Who me?  Yes you! couldn't be.", true));
 }