コード例 #1
0
ファイル: EquipmentTest.php プロジェクト: georgeh/php-beerxml
 public function testConvertsBooleanToString()
 {
     $this->record->setCalcBoilVolume(true);
     $this->generator->build();
     $xml = $this->xml->outputMemory(true);
     $this->assertTag(array('tag' => 'CALC_BOIL_VOLUME', 'content' => 'TRUE'), $xml, '', false);
     $this->record->setCalcBoilVolume(false);
     $this->generator->build();
     $xml = $this->xml->outputMemory(true);
     $this->assertTag(array('tag' => 'CALC_BOIL_VOLUME', 'content' => 'FALSE'), $xml, '', false);
 }
コード例 #2
0
ファイル: Equipment.php プロジェクト: georgeh/php-beerxml
 protected function additionalFields()
 {
     $this->xmlWriter->writeElement('CALC_BOIL_VOLUME', $this->boolToString($this->record->getCalcBoilVolume()));
     return parent::additionalFields();
 }