class StaticReflectionServiceTest in Plug 7
@group DCOM-93
Hierarchy
- class \Doctrine\Tests\Common\Persistence\Mapping\StaticReflectionServiceTest extends \Doctrine\Tests\Common\Persistence\Mapping\PHPUnit_Framework_TestCase
Expanded class hierarchy of StaticReflectionServiceTest
1 string reference to 'StaticReflectionServiceTest'
- StaticReflectionServiceTest::testShortname in lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ Mapping/ StaticReflectionServiceTest.php
File
- lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ Mapping/ StaticReflectionServiceTest.php, line 27
Namespace
Doctrine\Tests\Common\Persistence\MappingView source
class StaticReflectionServiceTest extends \PHPUnit_Framework_TestCase {
private $reflectionService;
public function setUp() {
$this->reflectionService = new StaticReflectionService();
}
public function testShortname() {
$this
->assertEquals("StaticReflectionServiceTest", $this->reflectionService
->getClassShortName(__CLASS__));
}
public function testClassNamespaceName() {
$this
->assertEquals("Doctrine\\Tests\\Common\\Persistence\\Mapping", $this->reflectionService
->getClassNamespace(__CLASS__));
}
public function testGetParentClasses() {
$classes = $this->reflectionService
->getParentClasses(__CLASS__);
$this
->assertTrue(count($classes) == 0, "The test class " . __CLASS__ . " should have no parents according to static reflection.");
}
public function testGetReflectionClass() {
$class = $this->reflectionService
->getClass(__CLASS__);
$this
->assertNull($class);
}
public function testGetMethods() {
$this
->assertTrue($this->reflectionService
->hasPublicMethod(__CLASS__, "testGetMethods"));
$this
->assertTrue($this->reflectionService
->hasPublicMethod(__CLASS__, "testGetMethods2"));
}
public function testGetAccessibleProperty() {
$reflProp = $this->reflectionService
->getAccessibleProperty(__CLASS__, "reflectionService");
$this
->assertNull($reflProp);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StaticReflectionServiceTest:: |
private | property | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function | ||
StaticReflectionServiceTest:: |
public | function |