Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bootstrap the test suite

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