From d57aed4049afdae6dd72d0dd7f42d13bda451a21 Mon Sep 17 00:00:00 2001 From: xisi Date: Fri, 24 Jan 2014 11:18:07 -0500 Subject: [PATCH] basic test stuff --- tests/bootstrap.php | 23 +++++++++++++++++++ tests/config.php | 11 +++++++++ tests/phpunit.xml | 13 +++++++---- tests/unit/config/SampleTest.php | 11 +++------ .../unit/securityregress/SecurityRegress.php | 13 +++++++++++ 5 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 tests/bootstrap.php create mode 100644 tests/config.php create mode 100644 tests/unit/securityregress/SecurityRegress.php diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 00000000..3aa4c274 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/tests/config.php b/tests/config.php new file mode 100644 index 00000000..a4beacb8 --- /dev/null +++ b/tests/config.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 6cafbdac..258e159e 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,5 +1,10 @@ + - - unit/config - - \ No newline at end of file + + unit/config + + + unit/securityregress/SecurityRegress.php + + + \ No newline at end of file diff --git a/tests/unit/config/SampleTest.php b/tests/unit/config/SampleTest.php index 9b445a57..3ee6c140 100644 --- a/tests/unit/config/SampleTest.php +++ b/tests/unit/config/SampleTest.php @@ -2,17 +2,12 @@ // these are ONLY here because we're checking config options // these should NOT be in a normal unit test -define('SECURITY', 'so we can check config options'); -define("BASEPATH", "./"); - -require_once(BASEPATH.'public/include/config/global.inc.dist.php'); -require_once("PHPUnit/Autoload.php"); class TestDistConfig extends PHPUnit_Framework_Testcase { /** -* Test to make sure SALT is sane -*/ - function testSalt() { + * Test to make sure SALT is sane + */ + function testSaltLength() { $this->assertNotEmpty(SALT); $this->assertGreaterThan(1, strlen(SALT)); } diff --git a/tests/unit/securityregress/SecurityRegress.php b/tests/unit/securityregress/SecurityRegress.php new file mode 100644 index 00000000..6e40ce1d --- /dev/null +++ b/tests/unit/securityregress/SecurityRegress.php @@ -0,0 +1,13 @@ + \ No newline at end of file