/**
* testTokenize method
*
* @return void
*/
public function testTokenize()
{
$result = String::tokenize('A,(short,boring test)');
$expected = array('A', '(short,boring test)');
$this->assertEqual($expected, $result);
$result = String::tokenize('A,(short,more interesting( test)');
$expected = array('A', '(short,more interesting( test)');
$this->assertEqual($expected, $result);
$result = String::tokenize('A,(short,very interesting( test))');
$expected = array('A', '(short,very interesting( test))');
$this->assertEqual($expected, $result);
$result = String::tokenize('"single tag"', array('separator' => ' ', 'leftBound' => '"', 'rightBound' => '"'));
$expected = array('"single tag"');
$this->assertEqual($expected, $result);
$result = String::tokenize('tagA "single tag" tagB', array('separator' => ' ', 'leftBound' => '"', 'rightBound' => '"'));
$expected = array('tagA', '"single tag"', 'tagB');
$this->assertEqual($expected, $result);
$result = String::tokenize(array());
$expected = array();
$this->assertEqual($expected, $result);
$result = String::tokenize(null);
$this->assertNull($result);
}