예제 #1
0
 public function testInvalidAdapter()
 {
     $barcode = new Barcode('Ean13');
     $this->setExpectedException('Zend\\Validator\\Exception\\InvalidArgumentException', 'does not implement');
     require_once __DIR__ . "/_files/MyBarcode5.php";
     $barcode->setAdapter('MyBarcode5');
 }
예제 #2
0
 public function testInvalidAdapter()
 {
     $barcode = new Barcode('Ean13');
     try {
         require_once __DIR__ . "/_files/MyBarcode5.php";
         $barcode->setAdapter('MyBarcode5');
         $this->fails('Exception expected');
     } catch (\Exception $e) {
         $this->assertContains('does not implement', $e->getMessage());
     }
 }