expectNotToPerformAssertions("It should not throw"); } public function testUnparsableIsbn() { $this->expectException("Biblys\Isbn\IsbnParsingException"); $this->expectExceptionMessage("Invalid characters in the code"); Isbn::validateAsIsbn10("3-ABC-60352-0"); } public function testIsbnWithMisplacedHyphen() { $this->expectException("Biblys\Isbn\IsbnValidationException"); $this->expectExceptionMessage("3-46460-352-0 is not a valid ISBN-10. Expected 3-464-60352-0."); Isbn::validateAsIsbn10("3-46460-352-0"); } public function testIsbnWithoutHyphens() { $this->expectException("Biblys\Isbn\IsbnValidationException"); $this->expectExceptionMessage("3464603520 is not a valid ISBN-10. Expected 3-464-60352-0."); Isbn::validateAsIsbn10("3464603520"); } public function testIsbnWithIncorrectCheckum() { $this->expectException("Biblys\Isbn\IsbnValidationException"); $this->expectExceptionMessage("3-46460-352-X is not a valid ISBN-10. Expected 3-464-60352-0."); Isbn::validateAsIsbn10("3-46460-352-X"); } }