Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
12 mocha-tests/microformat-php-mf2-helper.js
@@ -0,0 +1,12 @@
+var helper = {};
+helper.parseHTML = function(htmlFragment,baseUrl){
+ var request = new XMLHttpRequest();
+ var ran = Math.floor(Math.random()*9999999)
+ request.open('GET', 'http://waterpigs.co.uk/php-mf2/api/?html=' + encodeURIComponent(htmlFragment) + '&baseurl=' + encodeURIComponent(baseUrl) + '&ran=' + ran, false);
+ request.send();
+ if (request.status === 200) {
+ return JSON.parse(request.responseText);
+ }else{
+ return {};
+ }
+}
View
32 mocha-tests/microformat-php-mf2-v1.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <title>php-mf2 test suite</title>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+ <link rel="stylesheet" href="framework/mocha.css" />
+ <script src="framework/mocha.js"></script>
+ <script src="framework/chai.js"></script>
+ <script src="microformat-php-mf2-helper.js"></script>
+
+ <script>mocha.setup('bdd')</script>
+ <script src="h-adr-test.js"></script>
+ <script src="h-card-test.js"></script>
+ <script src="h-entry-test.js"></script>
+ <script src="h-event-test.js"></script>
+ <script src="h-geo-test.js"></script>
+ <script src="h-org-test.js"></script>
+ <script src="h-resume-test.js"></script>
+
+ <script>
+ onload = function(){
+ mocha.run();
+ };
+ </script>
+
+ </head>
+ <body>
+ <h3>php-mf2 - microformats 2 test</h3>
+ <div id="mocha"></div>
+ </body>
+</html>

No commit comments for this range

Something went wrong with that request. Please try again.