示例#1
0
 /**
  * このオブジェクトに紐付いている Builder の build() が実行されることを確認します.
  * @covers Peach\Markup\HelperObject::write
  */
 public function testWrite()
 {
     $h1 = $this->helper;
     $obj1 = TestUtil::createTestHelperObject($h1);
     $this->assertSame(TestUtil::getDefaultBuildResult(), $obj1->write());
     $b = new DefaultBuilder();
     $b->setRenderer("SGML");
     $b->setIndent(new Indent(0, "  ", Indent::LF));
     $h2 = new Helper($b, array("meta", "input", "br"));
     $obj2 = TestUtil::createTestHelperObject($h2);
     $this->assertSame(TestUtil::getCustomBuildResult(), $obj2->write());
 }
示例#2
0
 /**
  * Helper にセットされた Builder の build() の結果が返ることを確認します.
  * @covers Peach\Markup\Helper::write
  */
 public function testWrite()
 {
     $h = $this->object;
     $o = $h->createObject(TestUtil::getTestNode());
     $this->assertSame(TestUtil::getDefaultBuildResult(), $h->write($o));
 }