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'); }
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()); } }