X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fpsy%2Fpsysh%2Ftest%2FPsy%2FTest%2FReflection%2FReflectionConstantTest.php;fp=vendor%2Fpsy%2Fpsysh%2Ftest%2FPsy%2FTest%2FReflection%2FReflectionConstantTest.php;h=a3c6464b0cab7ded9e0ba794f27b7dfe1d558b30;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hp=0000000000000000000000000000000000000000;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/psy/psysh/test/Psy/Test/Reflection/ReflectionConstantTest.php b/vendor/psy/psysh/test/Psy/Test/Reflection/ReflectionConstantTest.php new file mode 100644 index 000000000..a3c6464b0 --- /dev/null +++ b/vendor/psy/psysh/test/Psy/Test/Reflection/ReflectionConstantTest.php @@ -0,0 +1,60 @@ +getDeclaringClass(); + + $this->assertTrue($class instanceof \ReflectionClass); + $this->assertEquals('Psy\Test\Reflection\ReflectionConstantTest', $class->getName()); + $this->assertEquals('CONSTANT_ONE', $refl->getName()); + $this->assertEquals('CONSTANT_ONE', (string) $refl); + $this->assertEquals('one', $refl->getValue()); + $this->assertEquals(null, $refl->getFileName()); + $this->assertFalse($refl->getDocComment()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testUnknownConstantThrowsException() + { + new ReflectionConstant($this, 'UNKNOWN_CONSTANT'); + } + + /** + * @expectedException \RuntimeException + * @dataProvider notYetImplemented + */ + public function testNotYetImplemented($method) + { + $refl = new ReflectionConstant($this, 'CONSTANT_ONE'); + $refl->$method(); + } + + public function notYetImplemented() + { + return array( + array('getStartLine'), + array('getEndLine'), + array('export'), + ); + } +}