Пример #1
0
 /**
  * @param ParserInterface $parser
  */
 public function addParser(ParserInterface $parser)
 {
     $this->parsers[$parser->getFieldName()] = $parser;
 }
 public function testGetLineWeight()
 {
     $this->assertEquals(25, $this->parser->getLineWeight());
 }
Пример #3
0
 public function testGetText()
 {
     $expected = (new \DateTime())->format('dmY');
     $this->assertEquals($expected, $this->parser->getText());
 }
 /**
  * @param ParserInterface $parser
  *
  * @return RendererInterface
  */
 protected function instantiateRenderer(ParserInterface $parser)
 {
     return GraphicPrimitiveFactory::getRenderer($parser->getShape());
 }
Пример #5
0
 public function testGetIsInverse()
 {
     $this->assertSame(true, $this->parser->getIsInverse());
 }
Пример #6
0
 public function testGetIsDisplayed()
 {
     $this->assertSame(true, $this->parser->getIsDisplayed());
 }
 public function testGetGraphic()
 {
     $this->assertEquals('w:/example.bmp', $this->parser->getGraphic());
 }
Пример #8
0
 public function testGetTextMerged()
 {
     $this->assertSame('some text other text', $this->parser3->getText());
 }
Пример #9
0
 /**
  * @return bool
  */
 public function getIsDisplayed()
 {
     return $this->parser->getIsDisplayed();
 }
Пример #10
0
 public function testGetText()
 {
     $expected = (new \DateTime())->modify('+10 days')->format('m/d/y');
     $this->assertEquals($expected, $this->parser->getText());
 }
Пример #11
0
 /**
  * @param ParserInterface $parser
  *
  * @return ParserInterface
  */
 protected function buildParser(ParserInterface $parser)
 {
     $parser->setXmlField($this->getXmlField());
     $parser->setParserManager($this->getParserManager());
     return $parser;
 }