We apologize for the instability of composr.app and appreciate your patience. We are working on the statistics addon and trying to find an optimal way to store and render data. Unfortunately, we have yet to find a solution that can handle the traffic (and therefore, tens of millions of statistical records) of composr.app. We're working hard on one.
<?php /*
Composr
Copyright (c) ocProducts, 2004-2016
See text/EN/licence.txt for full licencing information.
*/
/**
* @license http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
* @copyright ocProducts Ltd
* @package testing_platform
*/
/**
* Composr test case class (unit testing).
*/
class schemadotorg_test_set extends cms_test_case
{
public function setUp()
{
require_code('lorem');
parent::setUp();
}
public function testScreens()
{
$tpl = render_screen_preview('AUTHOR_SCREEN.tpl', 'authors', 'tpl_preview__author_screen');
$this->do_validation($tpl->evaluate());
}
protected function do_validation($data)
{
$url = 'https://search.google.com/structured-data/testing-tool/u/0/validate';
$post_params = array('html' => $data);
$result = http_download_file($url, null, true, false, 'Composr', $post_params);
}
public function tearDown()
{
parent::tearDown();
}
}
... but I can't find a validator we can easily use as an API. Google's returns a load of JavaScript.