Ejemplo n.º 1
0
 public function testAddTextImageAndLineAndQrCode()
 {
     $printContent = new PrintContent();
     $printContent->addTextImage('QR CODE')->addLine()->addQrCode('http://memobird.cn');
     $printPaperResult = $this->memobird->printPaper($this->config['memobird_id'], $printContent);
     $this->assertTrue($printPaperResult->success());
     $this->assertEquals(1, $printPaperResult->getShowapiResCode(), 'Res code = 1');
     $this->assertGreaterThanOrEqual(1, $printPaperResult->getResult(), 'Result = 1 or 2');
     $this->assertGreaterThan(0, $printPaperResult->getPrintcontentid(), 'Printcontentid > 0');
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Atans\Memobird\Exception\InvalidArgumentException
  */
 public function testException()
 {
     $printContent = new PrintContent();
     $printContent->addContent('UNKNOWN', 'test error type');
 }