Last active
October 8, 2015 08:28
-
-
Save luissquall/3305595 to your computer and use it in GitHub Desktop.
Characters assertion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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