incubator-zeta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From der...@apache.org
Subject [zeta-commits] svn commit: r1180902 - in /incubator/zetacomponents/trunk/Reflection/tests: class_test.php parser_test.php
Date Mon, 10 Oct 2011 12:03:48 GMT
Author: derick
Date: Mon Oct 10 12:03:47 2011
New Revision: 1180902

URL: http://svn.apache.org/viewvc?rev=1180902&view=rev
Log:
Fixed test cases.

Modified:
    incubator/zetacomponents/trunk/Reflection/tests/class_test.php
    incubator/zetacomponents/trunk/Reflection/tests/parser_test.php

Modified: incubator/zetacomponents/trunk/Reflection/tests/class_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Reflection/tests/class_test.php?rev=1180902&r1=1180901&r2=1180902&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Reflection/tests/class_test.php (original)
+++ incubator/zetacomponents/trunk/Reflection/tests/class_test.php Mon Oct 10 12:03:47 2011
@@ -174,7 +174,32 @@ class ezcReflectionClassTest extends ezc
     public function testGetLongDescription() {
         $desc = $this->classTestWebservice->getLongDescription();
 
-        $expected = "This is the long description with may be additional infos and much more
lines\nof text.\n\nEmpty lines are valid, too.\n\nfoo bar";
+        $expected = <<<ENDDATA
+This is the long description with may be additional infos and much more lines
+of text.
+
+Empty lines are valid, too.
+
+foo bar
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+ENDDATA;
+
         self::assertEquals($expected, $desc);
     }
 

Modified: incubator/zetacomponents/trunk/Reflection/tests/parser_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/Reflection/tests/parser_test.php?rev=1180902&r1=1180901&r2=1180902&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/Reflection/tests/parser_test.php (original)
+++ incubator/zetacomponents/trunk/Reflection/tests/parser_test.php Mon Oct 10 12:03:47 2011
@@ -35,7 +35,7 @@ class ezcReflectionDocCommentParserTest 
     public function testGetAnnotationsByName() {
         $parser = ezcReflection::getDocCommentParser();
         $parser->parse(self::$docs[0]);
-        $annotations = $parser->getAnnotationsByName('copyright');
+        $annotations = $parser->getAnnotationsByName('license');
         self::assertEquals(1, count($annotations));
 
         $annotations = $parser->getAnnotationsByName('filesource');
@@ -69,7 +69,7 @@ class ezcReflectionDocCommentParserTest 
         $parser = ezcReflection::getDocCommentParser();
         $parser->parse(self::$docs[0]);
         $annotations = $parser->getAnnotations();
-        self::assertEquals(6, count($annotations));
+        self::assertEquals(5, count($annotations));
 
         $parser = ezcReflection::getDocCommentParser();
         $parser->parse(self::$docs[1]);
@@ -218,7 +218,32 @@ EOF;
         $parser->parse($doc);
         $desc = $parser->getLongDescription();
 
-        $expected = "This is the long description with may be additional infos and much more
lines\nof text.\n\nEmpty lines are valid, too.\n\nfoo bar";
+        $expected = <<<ENDDATA
+This is the long description with may be additional infos and much more lines
+of text.
+
+Empty lines are valid, too.
+
+foo bar
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+ENDDATA;
+
         self::assertEquals($expected, $desc);
     }
 



Mime
View raw message