Skip to content
This repository
Browse code

Bootstrap the test suite

  • Loading branch information...
commit cc79410aeb89ff2838fef6e34eae16a7bf278541 1 parent a96529d
Henri Bergius bergie authored
2  .gitignore
... ... @@ -1,2 +1,4 @@
1 1 composer.phar
2 2 composer.lock
  3 +vendor/
  4 +phpunit.xml
15 phpunit.xml.dist
... ... @@ -0,0 +1,15 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +
  3 +<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
  4 +<phpunit
  5 + colors="true"
  6 + bootstrap="tests/bootstrap.php"
  7 +>
  8 +
  9 + <testsuites>
  10 + <testsuite name="CreatePHP Test Suite">
  11 + <directory>./tests</directory>
  12 + </testsuite>
  13 + </testsuites>
  14 +
  15 +</phpunit>
6 tests/bootstrap.php
... ... @@ -0,0 +1,6 @@
  1 +<?php
  2 +$file = __dir__.'/../vendor/autoload.php';
  3 +if (!file_exists($file)) {
  4 + throw new RuntimeException('Run "composer update --dev" so that you\'ll be able to run the test suite');
  5 +}
  6 +require $file;
11 tests/widgetTest.php
... ... @@ -0,0 +1,11 @@
  1 +<?php
  2 +namespace openpsa\createphp\tests;
  3 +
  4 +use openpsa\createphp\widget;
  5 +
  6 +class widgetTest extends \PHPUnit_Framework_TestCase {
  7 + public function testMethods() {
  8 + $wgt = new widget();
  9 + $this->assertTrue(method_exists($wgt, 'render'));
  10 + }
  11 +}

0 comments on commit cc79410

Please sign in to comment.
Something went wrong with that request. Please try again.