X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fpsy%2Fpsysh%2Ftest%2FReflection%2FReflectionConstantTest.php;fp=vendor%2Fpsy%2Fpsysh%2Ftest%2FReflection%2FReflectionConstantTest.php;h=713a7e33720194dfc13e8d61a27f4c766712c631;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0000000000000000000000000000000000000000;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php b/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php new file mode 100644 index 000000000..713a7e337 --- /dev/null +++ b/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php @@ -0,0 +1,60 @@ +getDeclaringClass(); + + $this->assertInstanceOf('ReflectionClass', $class); + $this->assertSame('Psy\Test\Reflection\ReflectionConstantTest', $class->getName()); + $this->assertSame('CONSTANT_ONE', $refl->getName()); + $this->assertSame('CONSTANT_ONE', (string) $refl); + $this->assertSame('one', $refl->getValue()); + $this->assertNull($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 [ + ['getStartLine'], + ['getEndLine'], + ['export'], + ]; + } +}