You are here

class UsesTagTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php \phpDocumentor\Reflection\DocBlock\Tag\UsesTagTest

Test class for \phpDocumentor\Reflection\DocBlock\Tag\UsesTag

@author Daniel O'Connor <daniel.oconnor@gmail.com> @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) @license http://www.opensource.org/licenses/mit-license.php MIT @link http://phpdoc.org

Hierarchy

  • class \phpDocumentor\Reflection\DocBlock\Tag\UsesTagTest extends \phpDocumentor\Reflection\DocBlock\Tag\PHPUnit_Framework_TestCase

Expanded class hierarchy of UsesTagTest

File

vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php, line 23

Namespace

phpDocumentor\Reflection\DocBlock\Tag
View source
class UsesTagTest extends \PHPUnit_Framework_TestCase {

  /**
   * Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create
   * a link for the @uses doc block.
   *
   * @param string $type
   * @param string $content
   * @param string $exContent
   * @param string $exReference
   *
   * @covers \phpDocumentor\Reflection\DocBlock\Tag\UsesTag
   * @dataProvider provideDataForConstuctor
   *
   * @return void
   */
  public function testConstructorParesInputsIntoCorrectFields($type, $content, $exContent, $exDescription, $exReference) {
    $tag = new UsesTag($type, $content);
    $this
      ->assertEquals($type, $tag
      ->getName());
    $this
      ->assertEquals($exContent, $tag
      ->getContent());
    $this
      ->assertEquals($exDescription, $tag
      ->getDescription());
    $this
      ->assertEquals($exReference, $tag
      ->getReference());
  }

  /**
   * Data provider for testConstructorParesInputsIntoCorrectFields
   *
   * @return array
   */
  public function provideDataForConstuctor() {

    // $type, $content, $exContent, $exDescription, $exReference
    return array(
      array(
        'uses',
        'Foo::bar()',
        'Foo::bar()',
        '',
        'Foo::bar()',
      ),
      array(
        'uses',
        'Foo::bar() Testing',
        'Foo::bar() Testing',
        'Testing',
        'Foo::bar()',
      ),
      array(
        'uses',
        'Foo::bar() Testing comments',
        'Foo::bar() Testing comments',
        'Testing comments',
        'Foo::bar()',
      ),
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UsesTagTest::provideDataForConstuctor public function Data provider for testConstructorParesInputsIntoCorrectFields
UsesTagTest::testConstructorParesInputsIntoCorrectFields public function Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create a link for the @uses doc block.