/** * @covers Peach\Markup\DefaultContext::__construct * @covers Peach\Markup\DefaultContext::getResult */ public function testGetResult() { $test = TestUtil::getTestNode(); $expect1 = TestUtil::getDefaultBuildResult(); $obj1 = $this->object; $obj1->handle($test); $this->assertSame($expect1, $obj1->getResult()); $expect2 = TestUtil::getCustomBuildResult(); $indent = new Indent(0, " ", Indent::LF); $obj2 = new DefaultContext(SgmlRenderer::getInstance(), $indent); $obj2->handle($test); $this->assertSame($expect2, $obj2->getResult()); }
public function test_it_can_modify_state() { $context = new DefaultContext(); $context->setState('State1'); $this->assertEquals('State1', $context->state()); }