From cefb4aea2a7d3bc8b35ba2e76986a80f9a021891 Mon Sep 17 00:00:00 2001 From: matthew Date: Thu, 23 Apr 2009 16:27:29 +0000 Subject: [PATCH] Fix failing CodeGenerator tests git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15110 44c647ce-9c0f-0410-b52a-842ac1e357ba --- library/Zend/CodeGenerator/Php/Class.php | 2 +- tests/Zend/CodeGenerator/Php/ClassTest.php | 4 ++-- tests/Zend/CodeGenerator/Php/FileTest.php | 6 ++---- tests/Zend/CodeGenerator/Php/MethodTest.php | 3 +-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/library/Zend/CodeGenerator/Php/Class.php b/library/Zend/CodeGenerator/Php/Class.php index ab051c088..cfe394b1f 100644 --- a/library/Zend/CodeGenerator/Php/Class.php +++ b/library/Zend/CodeGenerator/Php/Class.php @@ -468,7 +468,7 @@ class Zend_CodeGenerator_Php_Class extends Zend_CodeGenerator_Php_Abstract $properties = $this->getProperties(); if (!empty($properties)) { foreach ($properties as $property) { - $output .= $property->generate() . PHP_EOL; + $output .= $property->generate() . PHP_EOL . PHP_EOL; } } diff --git a/tests/Zend/CodeGenerator/Php/ClassTest.php b/tests/Zend/CodeGenerator/Php/ClassTest.php index 0ae5157c3..e62409638 100644 --- a/tests/Zend/CodeGenerator/Php/ClassTest.php +++ b/tests/Zend/CodeGenerator/Php/ClassTest.php @@ -172,12 +172,12 @@ abstract class SampleClass extends ExtendedClassName implements Iterator, Traver } - } EOS; - $this->assertEquals($codeGenClass->generate(), $expectedOutput); + $output = $codeGenClass->generate(); + $this->assertEquals($expectedOutput, $output, $output); } } diff --git a/tests/Zend/CodeGenerator/Php/FileTest.php b/tests/Zend/CodeGenerator/Php/FileTest.php index 61da5927c..d17d43afa 100644 --- a/tests/Zend/CodeGenerator/Php/FileTest.php +++ b/tests/Zend/CodeGenerator/Php/FileTest.php @@ -84,12 +84,10 @@ abstract class SampleClass extends ExtendedClassName implements Iterator, Traver } - - - EOS; - $this->assertEquals($codeGenFile->generate(), $expectedOutput); + $output = $codeGenFile->generate(); + $this->assertEquals($expectedOutput, $output, $output); } public function testFromReflection() diff --git a/tests/Zend/CodeGenerator/Php/MethodTest.php b/tests/Zend/CodeGenerator/Php/MethodTest.php index 860a1e885..b4b2b3b0c 100644 --- a/tests/Zend/CodeGenerator/Php/MethodTest.php +++ b/tests/Zend/CodeGenerator/Php/MethodTest.php @@ -103,8 +103,7 @@ class Zend_CodeGenerator_Php_MethodTest extends PHPUnit_Framework_TestCase */ public function someMethod() { - /* test test */ - + /* test test */ } EOS; -- 2.11.4.GIT