コード例 #1
0
ファイル: PropertyTest.php プロジェクト: netvlies/zf
 /**
  * @group ZF-8849
  */
 public function testZF8849()
 {
     $property = new Zend_CodeGenerator_Php_Property(array('defaultValue' => array('value' => 1.337, 'type' => 'string'), 'name' => 'ZF8849', 'const' => true));
     $this->assertEquals($property->generate(), "    const ZF8849 = '1.337';");
 }
コード例 #2
0
ファイル: PropertyTest.php プロジェクト: vicfryzel/zf
 public function testOtherTypesThrowExceptionOnGenerate()
 {
     $codeGenProperty = new Zend_CodeGenerator_Php_Property(array('name' => 'someVal', 'defaultValue' => new stdClass()));
     $this->setExpectedException("Zend_CodeGenerator_Php_Exception");
     $codeGenProperty->generate();
 }