From b5227ddb67b772cd58e0e491e0f0d253a5b9e23f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 10 Dec 2014 00:11:03 +0100 Subject: [PATCH 1/3] Add code sniffer rules for 2.0 goals. --- build/code-sniffer-ruleset.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/code-sniffer-ruleset.xml b/build/code-sniffer-ruleset.xml index 963c2892..f6bf92c7 100644 --- a/build/code-sniffer-ruleset.xml +++ b/build/code-sniffer-ruleset.xml @@ -48,6 +48,15 @@ + + + + + + + + + From 218f1516937ed4f3c6c37f5b415cad20fa5d8204 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 17 Dec 2014 03:11:16 +0100 Subject: [PATCH 2/3] Do not require test classes to be namespaced. --- build/code-sniffer-ruleset-tests.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/code-sniffer-ruleset-tests.xml b/build/code-sniffer-ruleset-tests.xml index c3694258..f30722f7 100644 --- a/build/code-sniffer-ruleset-tests.xml +++ b/build/code-sniffer-ruleset-tests.xml @@ -16,6 +16,9 @@ + + + From ffb2fcab8068285a4c47d4e6332e6700130191c2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 17 Dec 2014 04:38:16 +0100 Subject: [PATCH 3/3] Remove side-effects from test files. --- tests/Unit/Crypt/AES/TestCase.php | 4 ++-- tests/Unit/Math/BigInteger/TestCase.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Unit/Crypt/AES/TestCase.php b/tests/Unit/Crypt/AES/TestCase.php index 8a222c4e..fa789bb0 100644 --- a/tests/Unit/Crypt/AES/TestCase.php +++ b/tests/Unit/Crypt/AES/TestCase.php @@ -9,12 +9,12 @@ use phpseclib\Crypt\AES; use phpseclib\Crypt\Base; use phpseclib\Crypt\Rijndael; -require_once 'Crypt/AES.php'; - abstract class Unit_Crypt_AES_TestCase extends PhpseclibTestCase { static public function setUpBeforeClass() { + include_once 'Crypt/AES.php'; + parent::setUpBeforeClass(); self::reRequireFile('Crypt/Rijndael.php'); diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php index f84c852f..fae3eb0c 100644 --- a/tests/Unit/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -5,12 +5,12 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -require_once 'Math/BigInteger.php'; - abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase { static public function setUpBeforeClass() { + include_once 'Math/BigInteger.php'; + parent::setUpBeforeClass(); self::reRequireFile('Math/BigInteger.php');