function testQuery() { include 'mysql_conn.php'; $isbn13 = new Isbn('978-3897215429'); $result = IsbnQuery::query($isbn13); $this->assertEquals($isbn13->toString(), $result->get('isbn')); $this->assertEquals('2008', $result->get('year')); }
public function checkIsbnQuery() { if (!$this->book && isset($_POST['isbnQuery']) && isset($_POST['isbn'])) { try { $isbn = new Isbn($_POST['isbn']); $this->book = IsbnQuery::query($isbn); $this->output->setFocus('author'); } catch (Exception $ex) { $this->fillForm(); $this->addForm->addSubtemplate('wrongIsbn'); } } else { $this->output->unlinkMenuEntry('Buch anbieten'); $this->output->setFocus('isbn'); } }