Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop' of github.com:phpDocumentor/phpDocumentor2 int…

…o develop
  • Loading branch information...
commit e79fc374634cea666dd19665a52656ee330f9110 2 parents 45a3f0a + b054ec0
@mvriel mvriel authored
View
6 .travis.yml
@@ -3,10 +3,14 @@ php:
- 5.3
- 5.4
-script: phpunit --coverage-text
+script:
+ - phpunit --coverage-text
+ - pyrus package
before_script:
- pyrus install -f http://download.pear.php.net/package/PEAR-1.9.4.tgz
+ - pyrus install -f -p pyrus/Pyrus_Developer
+ - pyrus install -f pear2.php.net/PEAR2_Exception
- git clone https://github.com/phpDocumentor/template.responsive.git lib/template.responsive
- pyrus channel-discover pear.phpdoc.org
- pyrus install -f lib/template.responsive/package.xml
View
2  package.xml
@@ -2900,7 +2900,7 @@ Please see the CHANGELOG in the root of the application for the latest changes
</file>
</dir> <!-- /tests/ui -->
<dir name="unit">
- <dir name="DocBlox">
+ <dir name="phpDocumentor">
<dir name="GraphViz">
<file baseinstalldir="/phpDocumentor" name="AttributeTest.php" role="php">
<tasks:replace from="@php_bin@" to="php_bin" type="pear-config" />
View
2  src/phpDocumentor/Parser/Exporter/Xml.php
@@ -332,4 +332,4 @@ public function getContents()
{
return $this->xml->saveXML();
}
-}
+}
View
81 tests/unit/phpDocumentor/Reflection/Tag/VarTest.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * phpDocumentor Var Tag Test
+ *
+ * @category phpDocumentor
+ * @package Reflection
+ * @subpackage Tests
+ * @author Daniel O'Connor <daniel.oconnor@gmail.com>
+ * @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
+ */
+
+/**
+ * Test class for phpDocumentor_Reflection_DocBlock_Tag_Link
+ *
+ * @category phpDocumentor
+ * @package Reflection
+ * @subpackage Tests
+ * @author Daniel O'Connor <daniel.oconnor@gmail.com>
+ * @copyright Copyright (c) 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
+ */
+class phpDocumentor_Reflection_DocBlock_Tag_VarTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * Test that the phpDocumentor_Reflection_DocBlock_Tag_Var can understand
+ * the @var doc block
+ *
+ * @param string $type
+ * @param string $content
+ * @param string $exType
+ * @param string $exVariable
+ * @param string $exDescription
+ *
+ * @covers phpDocumentor_Reflection_DocBlock_Tag_Var::__construct
+ * @dataProvider provideDataForConstuctor
+ *
+ * @return void
+ */
+ public function testConstructorParesInputsIntoCorrectFields(
+ $type, $content, $exType, $exVariable, $exDescription
+ )
+ {
+ $tag = new phpDocumentor_Reflection_DocBlock_Tag_Var($type, $content);
+
+ $this->assertEquals($exType, $tag->getType());
+ $this->assertEquals($exVariable, $tag->getVariableName());
+ $this->assertEquals($exDescription, $tag->getDescription());
+ }
+
+ /**
+ * Data provider for testConstructorParesInputsIntoCorrectFields
+ *
+ * @return array
+ */
+ public function provideDataForConstuctor()
+ {
+ // $type, $content
+ return array(
+ array(
+ 'var',
+ 'int',
+ 'int',
+ '',
+ ''
+ ),
+ array(
+ 'var',
+ 'int $bob',
+ 'int',
+ '$bob',
+ ''
+ ),
+ array(
+ 'var',
+ 'int $bob Number of bobs',
+ 'int',
+ '$bob',
+ 'Number of bobs'
+ ),
+ );
+ }
+}
View
2  tests/unit/phpDocumentor/TransformerTest.php
@@ -136,7 +136,7 @@ public function testGenerateFilename()
$filename = 'directory' . DIRECTORY_SEPARATOR . 'directory2'
. DIRECTORY_SEPARATOR . 'file.php';
$this->assertEquals(
- 'db_directory_directory2_file.html',
+ 'directory.directory2.file.html',
$this->fixture->generateFilename($filename)
);
}

0 comments on commit e79fc37

Please sign in to comment.
Something went wrong with that request. Please try again.