scan($text); $this->assertTrue(isset($token_wannabes['valid']['simple']), 'A simple valid token has been matched.'); $this->assertTrue(isset($token_wannabes['valid']['token with: spaces']), 'A valid token with space characters in the token name has been matched.'); $this->assertFalse(isset($token_wannabes['not valid']), 'An invalid token with spaces in the token type has not been matched.'); $this->assertFalse(isset($token_wannabes['empty token']), 'An empty token has not been matched.'); $this->assertFalse(isset($token_wannabes['']['empty token type']), 'An empty token type has not been matched.'); $this->assertFalse(isset($token_wannabes['']['']), 'An empty token and type has not been matched.'); $this->assertTrue(isset($token_wannabes['node']), 'An existing valid token has been matched.'); } }