Table of contents
* About the project
* Status
* License
* Contributing
* Install
* Getting started, (*1)
About the project
This project provides a test harness to run the conformance suite test defined for XBRL 2.1, XDT, Formulas and Function Registry functions, (*2)
Test harness notes
XBRL 2.1
A small number of the tests are not used. The XBRL processor only has incomplete support for reference link bases so tests using or relating to
reference links are not run for any of the conformance suites. These tests include tests 291 V-12, V-13, V-14 and V-15, (*3)
The formula processor does support some of the specifications that do not yet have a recommended status such as
Formula Tuples
and Vaiables Scope. However it
does not support the Variable Instances for Multi-Instance Processing and Chaining specifications., (*4)
This means the XBRL Formula processor test harness will not include tests in the groups 60300 (Instances processing) and 60400 (Instances chaining processing)., (*5)
Links
This project does not include the conformance suite tests. The relevant suite files can be downloaded:, (*6)
Status
, (*7)
, (*8)
Dependencies
This project depends on lyquidity/XPath20 and on the lyquidity/XBRL., (*9)
License
This project is released under GPL version 3.0, (*10)
What does this mean?, (*11)
It means you can use the source code in any way you see fit. However, the source code for any changes you make must be made available to others and must be made
available on the same terms as you receive the source code in this project: under a GPL v3.0 license. You must include the license of this project with any
distribution of the source code whether the distribution includes all the source code or just part of it. For example, if you create a class that derives
from one of the classes provided by this project - a new taxonomy class, perhaps - that is derivative., (*12)
What does this not mean?, (*13)
It does not mean that any products you create that only use this source code must be released under GPL v3.0. If you create a budgeting application that uses
the source code from this project to access data in instance documents, used by the budgeting application to transfer data, that is not derivative., (*14)
Contributing
We welcome contributions. See our contributions page for more information. If you do choose
to contribute we will ask you to agree to our Contributor License Agreement (CLA). We will
ask you to agree to the terms in the CLA to assure other users that the code they use is not going to be encumbered by a labyrinth of different license and patent
liabilities. You are also urged to review our code of conduct., (*15)
Install
The project can be installed by composer. First make sure the XPath 2.0 project is installed.
Assuming Composer is installed and a shortcut to the program is called 'composer' then the command to install this project is:, (*16)
composer require lyquidity/xbrl-tests:dev-master --prefer-dist
Or fork or download the repository. It will also be necessary to download and install the XML project., (*17)
You will then need to download the test suite zip file and unzip them to some location. In your application you will also need to add
defines called:
* CONFORMANCE_TEST_SUITE_XBRL_21_LOCATION
* CONFORMANCE_TEST_SUITE_FORMULA_LOCATION
* CONFORMANCE_TEST_SUITE_XDT_LOCATION
* CONFORMANCE_TEST_SUITE_XFI_LOCATION and
* CONFORMANCE_TEST_SUITE_GENERIC_LOCATION, (*18)
Give these a value which is the location you used to unzip the respective conformance test suite zip file.
See the example in the getting started section below., (*19)
Getting started
Assuming you have installed the library using composer then this PHP application will run the tests:, (*20)
<php
require_once __DIR__ . '/vendor/autoload.php';
// Create the location defines
define ( 'XBRL_CONF_LOCATION', '<location of the unzipped XBRL-CONF-2014-12-10.zip file>' );
define ( 'XDT_CONF_LOCATION', '<location of the unzipped XDT-CONF-CR4-2009-10-06.zip file>' );
define ( 'FORMULA_CONF_LOCATION', '<location of the unzipped FORMULA-CONF-REC-2013-09-12.zip file>' );
// Create the test defines
define( 'CONFORMANCE_TEST_SUITE_XBRL_21_LOCATION', XBRL_CONF_LOCATION );
define( 'CONFORMANCE_TEST_SUITE_XDT_LOCATION', XDT_CONF_LOCATION );
define( 'CONFORMANCE_TEST_SUITE_FORMULA_LOCATION', FORMULA_CONF_LOCATION . "tests/" );
define( 'CONFORMANCE_TEST_SUITE_XFI_LOCATION', FORMULA_CONF_LOCATION . "function-registry/" );
define( 'CONFORMANCE_TEST_SUITE_GENERIC_LOCATION', FORMULA_CONF_LOCATION . "tests/70000 Linkbase/" );
// Run each test suite. Note that some may run for a considerable time
include __DIR__ . "/vendor/lyquidity/XBRL-tests/conformance-21.php";
include __DIR__ . "/vendor/lyquidity/XBRL-tests/conformance-xdt.php";
include __DIR__ . "/vendor/lyquidity/XBRL-tests/conformance-formulas.php";
include __DIR__ . "/vendor/lyquidity/XBRL-tests/conformance-xfi.php";
include __DIR__ . "/vendor/lyquidity/XBRL-tests/conformance-generics.php";