X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FNode%2FStmt%2FPropertyTest.php;fp=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FNode%2FStmt%2FPropertyTest.php;h=bcfc0c6bd70fd9621b402d413ab848ceb71d0bb4;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=0000000000000000000000000000000000000000;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php new file mode 100644 index 000000000..bcfc0c6bd --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php @@ -0,0 +1,44 @@ +assertTrue($node->{'is' . $modifier}()); + } + + public function testNoModifiers() { + $node = new Property(0, array()); + + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isStatic()); + } + + public function testStaticImplicitlyPublic() { + $node = new Property(Class_::MODIFIER_STATIC, array()); + $this->assertTrue($node->isPublic()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); + $this->assertTrue($node->isStatic()); + } + + public function provideModifiers() { + return array( + array('public'), + array('protected'), + array('private'), + array('static'), + ); + } +}