From 9d38d4a5a056d870d4accbc9e67d51e4a8c15fa8 Mon Sep 17 00:00:00 2001 From: tswicegood Date: Fri, 11 Jan 2008 13:37:03 +0000 Subject: [PATCH] Add in real implementation to Section_INIModifier (fixes #16) git-svn-id: https://svn.phpt.info/Core/trunk@632 54d25d7b-d40e-47af-a99d-8d4037bc02b6 --- src/PHPT/Section/INIModifier.php | 2 +- tests/Section/INIModifier/declares-modifyINI.phpt | 23 +++++++++++++++++++++++ tests/Section/INIModifier/implements-section.phpt | 15 +++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/Section/INIModifier/declares-modifyINI.phpt create mode 100644 tests/Section/INIModifier/implements-section.phpt diff --git a/src/PHPT/Section/INIModifier.php b/src/PHPT/Section/INIModifier.php index 57127c4..a16f652 100644 --- a/src/PHPT/Section/INIModifier.php +++ b/src/PHPT/Section/INIModifier.php @@ -2,6 +2,6 @@ interface PHPT_Section_INIModifier extends PHPT_Section { - + public function modifyINI(PHPT_Section_INI $ini); } diff --git a/tests/Section/INIModifier/declares-modifyINI.phpt b/tests/Section/INIModifier/declares-modifyINI.phpt new file mode 100644 index 0000000..34788ef --- /dev/null +++ b/tests/Section/INIModifier/declares-modifyINI.phpt @@ -0,0 +1,23 @@ +--TEST-- +PHPT_Section_INIModifier declares modifyINI(PHPT_Section_INI $ini) +--FILE-- +hasMethod("modifyINI")'); + +$method = $reflection->getMethod('modifyINI'); +assert('$method->getNumberOfParameters() == 1'); + +$param = array_shift($method->getParameters()); +assert('$param->getName() == "ini"'); +assert('!is_null($param->getClass())'); +assert('$param->getClass()->getName() == "PHPT_Section_INI"'); + +?> +===DONE=== +--EXPECT-- +===DONE=== + diff --git a/tests/Section/INIModifier/implements-section.phpt b/tests/Section/INIModifier/implements-section.phpt new file mode 100644 index 0000000..7b6633a --- /dev/null +++ b/tests/Section/INIModifier/implements-section.phpt @@ -0,0 +1,15 @@ +--TEST-- +PHPT_Section_INIModifier implements PHPT_Section +--FILE-- +implementsInterface("PHPT_Section")'); + +?> +===DONE=== +--EXPECT-- +===DONE=== + -- 2.11.4.GIT