public function testMatch() { $text = new Text("1st2nd3rd"); $this->assertTrue($text->match('/(\\d)rd+/', $matches)); $this->assertEquals(array("3rd", "3"), $matches); }