From 05050e3f2c700642307ac0039d0a33d2e9b051f9 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 10 Jan 2008 00:33:18 +0000 Subject: [PATCH] Moved test control files into sapphire/testing, so that sapphire/tests can be ignored by the documentor. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47797 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- {tests => testing}/InstallerTest.php | 0 {tests => testing}/SapphireTest.php | 9 +++++++++ {tests => testing}/TestRunner.php | 15 +++++++++++++++ tests/DataObjectTest.php | 1 + 4 files changed, 25 insertions(+) rename {tests => testing}/InstallerTest.php (100%) rename {tests => testing}/SapphireTest.php (97%) rename {tests => testing}/TestRunner.php (83%) diff --git a/tests/InstallerTest.php b/testing/InstallerTest.php similarity index 100% rename from tests/InstallerTest.php rename to testing/InstallerTest.php diff --git a/tests/SapphireTest.php b/testing/SapphireTest.php similarity index 97% rename from tests/SapphireTest.php rename to testing/SapphireTest.php index 7cbebf726..cd00f7194 100644 --- a/tests/SapphireTest.php +++ b/testing/SapphireTest.php @@ -44,11 +44,15 @@ foreach($paths as $path) { if($hasPhpUnit) { +/** + */ require_once 'PHPUnit/Framework.php'; /** * Test case class for the Sapphire framework. * Sapphire unit testing is based on PHPUnit, but provides a number of hooks into our data model that make it easier to work with. + * @package sapphire + * @subpackage testing */ class SapphireTest extends PHPUnit_Framework_TestCase { function setUp() { @@ -171,6 +175,11 @@ class SapphireTest extends PHPUnit_Framework_TestCase { } else { // Stub + /** + * @ignore + * @package sapphire + * @subpackage testing + */ class SapphireTest extends Object {} } diff --git a/tests/TestRunner.php b/testing/TestRunner.php similarity index 83% rename from tests/TestRunner.php rename to testing/TestRunner.php index ce4348ce3..7c0147206 100644 --- a/tests/TestRunner.php +++ b/testing/TestRunner.php @@ -70,6 +70,8 @@ class TestRunner extends Controller { /** * @ignore + * @package sapphire + * @subpackage testing */ class TestRunner extends Controller { function index() { @@ -77,4 +79,17 @@ class TestRunner extends Controller { } } +// This class is here to help with documentation. + +/** + * PHPUnit is a testing framework that can be installed using PEAR. + * It's not bundled with Sapphire, you will need to install it yourself. + * + * @package sapphire + * @subpackage testing + */ +class PHPUnit_Framework_TestCase { + +} + } \ No newline at end of file diff --git a/tests/DataObjectTest.php b/tests/DataObjectTest.php index a7aa2cb19..d54254406 100644 --- a/tests/DataObjectTest.php +++ b/tests/DataObjectTest.php @@ -6,6 +6,7 @@ /** * Tests for DataObject + * @package tests */ class DataObjectTest extends SapphireTest { static $fixture_file = 'sapphire/tests/DataObjectTest.yml';