root/components/library/test/CorujaClassManipulationTest.php

User picture

Author: Igor Moreno Santos

Revision: 262 («Previous)


File Size: 3.75 KB

(July 14, 2009 00:17 UTC) Almost 3 years ago

Adjusting some includes

 
Show/hide line numbers
<?php
require_once 'PHPUnit/Framework.php';

require_once dirname( __FILE__ ).'/../../../_start.php';

/**
 * Test class for CorujaClassManipulation.
 * Generated by PHPUnit on 2008-10-24 at 22:47:23.
 */
class CorujaClassManipulationTest extends PHPUnit_Framework_TestCase
{
    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     *
     * @access protected
     */
    protected function setUp()
    {
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     *
     * @access protected
     */
    protected function tearDown()
    {
    }
    
    /**
     * @todo Implement testGetClassNameFromClassDefintion().
     */
    public function testGetClassNameFromClassDefinitionWithNullString() {

        // set up
        $strClassDefinition = null;

        // exercise
        $strClassName = CorujaClassManipulation::getClassNameFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertNull( $strClassName );

        
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }

    /**
     * @todo Implement testGetClassNameFromClassDefintion().
     */
    public function testGetClassNameFromClassDefinitionWithAnyString() {

        // set up
        $strClassDefinition = "anystring";

        // exercise
        $strClassName = CorujaClassManipulation::getClassNameFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertNull( $strClassName );

        
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }

    /**
     *
     */
    public function testGetClassNameFromClassDefinitionWithNormalClassDefinition() {

        // set up
        $strClassDefinition = "anynamespace::anyclassname";

        // exercise
        $strClassName = CorujaClassManipulation::getClassNameFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertEquals( "anyclassname", $strClassName );

    }

    /**
     * @todo Implement testGetNamespaceFromClassDefinition().
     */
    public function testGetNamespaceFromClassDefinitionWithNullString() {

        // set up
        $strClassDefinition = null;

        // exercise
        $strNamespace = CorujaClassManipulation::getNamespaceFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertNull( $strNamespace );

        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }

    /**
     * @todo Implement testGetNamespaceFromClassDefinition().
     */
    public function testGetNamespaceFromClassDefinitionWithAnyString() {

        // set up
        $strClassDefinition = "anystring";

        // exercise
        $strNamespace = CorujaClassManipulation::getNamespaceFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertNull( $strNamespace );

        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }

    /**
     *
     */
    public function testGetNamespaceFromClassDefinitionWithNormalClassDefinition() {

        // set up
        $strClassDefinition = "anynamespace::anyclassname";

        // exercise
        $strNamespace = CorujaClassManipulation::getNamespaceFromClassDefinition( $strClassDefinition );

        // assert
        $this->assertEquals( "anynamespace", $strNamespace );
    }
}
?>