Skip to content

testspace-samples/php.phpunit

 
 

Repository files navigation

Testspace


PHP/PHPUnit sample for demonstrating Testspace

Sample demonstrates techniques for using Testspace with PHP code and the PHPUnit test framework.

  • Using a Testspace Project that is connected with this GitHub Repo
  • Using 3 Online CI services for demonstration purposes only
  • Can review the Results at testspace-samples:php.phpunit
  • Refer to our Help for more information

Using Multiple Online CI Services:

Build Build Status CircleCI


Publishing Test Content using www.testspace.com.

Space Health Space Metric Space Metric


Download and configure the Testspace client

mkdir -p $HOME/bin
curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
testspace config url samples.testspace.com

In order to run this sample you will need a host workstation that supports the PHP.

Installation

composer update

Running Static Analysis:

vendor/bin/phpcs src tests --report-gitblame=analysis-sniffer-blame.txt --report-checkstyle=analysis-sniffer.xml
vendor/bin/phpmd src,tests xml codesize,naming,unusedcode --reportfile analysis-mess.xml

Running Tests with Code Coverage

vendor/bin/phpunit tests/unit --log-junit tests-results.xml --coverage-clover coverage.xml

Push Content using Testspace client. Note that ".testspace.txt" contains list of items to push.

testspace @.testspace.txt

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%