Skip to content

Instantly share code, notes, and snippets.

@luissquall
Last active October 8, 2015 08:28
Show Gist options
  • Save luissquall/3305595 to your computer and use it in GitHub Desktop.
Save luissquall/3305595 to your computer and use it in GitHub Desktop.
Characters assertion
<?php
public function testCharacters() {
$this->assertRegExp('/\w/', 'a');
preg_match_all('/[?.!\'\/,\\\;:-]/', '? . ! / , a \ ; : - \'', $matches);
$this->assertEqual($matches[0], array('?', '.', '!', '/', ',', '\\', ';', ':', '-', "'"));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment