public function testConstants() { $vonnegut = new Vonnegut(); require_once realpath(dirname(__FILE__)) . "/fixtures/Fixtures/Standalone.php"; $class = $vonnegut->reflectClass(new Zend_Reflection_Class('Fixtures_Standalone')); $constants = $class->constants; $this->assertEquals(1, count($constants), "There is one constant"); $this->assertArrayHasKey('FOO', $constants, "FOO is a constant"); $this->assertEquals('bar', $constants['FOO']->value, "FOO is bar"); }
public function testImplements() { $vonnegut = new Vonnegut(); require_once dirname(__FILE__) . "/fixtures/Fixtures/Interface.php"; require_once dirname(__FILE__) . "/fixtures/Fixtures/Interface/Implements.php"; $class = $vonnegut->reflectClass(new Zend_Reflection_Class('Fixtures_Interface_Implements')); $this->assertContains("Fixtures_Interface", $class->implements, "Contains 'Fixtures_Interface'"); }