public function testDefaultNotEmptyArray() { $property = new PhpProperty('fooArray'); $visitor = new DefaultVisitor(); $property->setDefaultValue(array("some value")); $visitor->visitProperty($property); $this->assertContains("some value", $visitor->getContent()); }
protected function getProperty(Property $node) { $prop = $node->props[0]; $p = new PhpProperty($prop->name); $default = $prop->default; if ($default !== null) { $p->setDefaultValue($this->getValue($default)); } $p->setStatic($node->isStatic()); $p->setVisibility($this->getVisibility($node)); $this->parseMemberDocblock($p, $node->getDocComment()); return $p; }