2017 © Pedro Peláez
 

library testdox-converter

Converts Testdox html into Markdown format

image

chippyash/testdox-converter

Converts Testdox html into Markdown format

  • Thursday, February 8, 2018
  • by chippyash
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

chippyash/testdox-converter

What?

Testdox html to Markdown conversion utility. A Utility that will convert Testdox formatted html output from PHPUnit into Markdown format, (*1)

Why?

To provide markdown formatted test contract files for inclusion in public files for a PHP library or application., (*2)

See the Monad library test contract as an example, (*3)

When

Additions to the utility are time dependent., (*4)

If you want more, either suggest it, or better still, fork it and provide a pull request., (*5)

Check out ZF4 Packages for more packages, (*6)

How

Install the package: See below., (*7)

Assuming that you have installed into your home directory at ~/tdconv, then the command is available at ~/tdconv/bin/tdconv., (*8)

Usage: tdconv [-t|title="..."] sourceHtmlTestDoxFile targetMarkdownTestContractFile, (*9)

e.g. ~/tdconv/bin/tdconv -t "This is the title" myLibTest.html contract.md, (*10)

To create the testdox file, you would run phpunit with the --testdox-html option, (*11)

This is a typical build script by way of example: build.sh, (*12)

#!/bin/bash
cd ~/Projects/chippyash/source/Monad
vendor/phpunit/phpunit/phpunit -c test/phpunit.xml --testdox-html contract.html test/
tdconv -t "Chippyash Monad" contract.html docs/Test-Contract.md
rm contract.html

Changing the library

  1. fork it
  2. write the test
  3. amend it
  4. do a pull request

Found a bug you can't figure out?, (*13)

  1. fork it
  2. write the test
  3. do a pull request

NB. Make sure you rebase to HEAD before your pull request, (*14)

Where?

The library is hosted at Github. It is available at Packagist.org, (*15)

Installation

Caveat: These instructions assume a Linux OS. (If you are a Windows/Mac user, please consider adding installation and usage instructions to this repo by way of a pull request.), (*16)

Install Composer, (*17)

Install the PHP XSL extension e.g. For debian based Linux, (*18)

    apt-get install php5-xsl

PHP normally has the XML extension built-in, but you may need to install it manually., (*19)

For production

Assumes Linux OS. (If you are a Windows/Mac user, please consider adding installation and usage instructions to this repo by way of a pull request.), (*20)

composer.phar create-project -sdev chippyash/testdox-converter tdconv, (*21)

This will download the package and install it into the ./tdconv directory. ./tdconv/bin/tdconv is a symlink to the executable. If you have a ~/bin directory in you path you might want to move or copy the link to it, or add the bin path to your $PATH variable., (*22)

If prompted with a "Do you want to remove the existing VCS (.git, .svn..) history?" message, then answer "Y" (the default answer.), (*23)

For development

Clone this repo, and then run Composer in local repo root to pull in dependencies, (*24)

    git clone git@github.com:chippyash/Testdox-Converter.git TDConv
    cd TDConv
    composer install

History

V1.0.0 Initial release, (*25)

V1.0.1 Doc update, (*26)

V1.0.2 update composer - forced by packagist composer.json format change, (*27)

The Versions

08/02 2018

dev-master

9999999-dev http://zf4.biz/packages?utm_source=packagist&utm_medium=web&utm_campaign=blinks&utm_content=testdoxconverter

Converts Testdox html into Markdown format

  Sources   Download

GPL 3.0 GPL-3.0-or-later

The Requires

 

test phpunit markdown contract testdox

08/02 2018

1.0.2

1.0.2.0 http://zf4.biz/packages?utm_source=packagist&utm_medium=web&utm_campaign=blinks&utm_content=testdoxconverter

Converts Testdox html into Markdown format

  Sources   Download

GPL-3.0-or-later

The Requires

 

test phpunit markdown contract testdox

16/06 2016

1.0.1

1.0.1.0 http://zf4.biz/packages?utm_source=packagist&utm_medium=web&utm_campaign=blinks&utm_content=testdoxconverter

Converts Testdox html into Markdown format

  Sources   Download

GPL 3.0

The Requires

 

test phpunit markdown contract testdox

22/03 2016

1.0.0

1.0.0.0 http://zf4.biz/packages?utm_source=packagist&utm_medium=web&utm_campaign=blinks&utm_content=testdoxconverter

Converts Testdox html into Markdown format

  Sources   Download

GPL 3.0

The Requires

 

test phpunit markdown contract testdox