Permalink
Browse files

Bootstrap the test suite

  • Loading branch information...
bergie committed Jun 21, 2012
1 parent a96529d commit cc79410aeb89ff2838fef6e34eae16a7bf278541
Showing with 34 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +15 −0 phpunit.xml.dist
  3. +6 −0 tests/bootstrap.php
  4. +11 −0 tests/widgetTest.php
View
@@ -1,2 +1,4 @@
composer.phar
composer.lock
+vendor/
+phpunit.xml
View
@@ -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
@@ -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
@@ -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'));
+ }
+}

0 comments on commit cc79410

Please sign in to comment.