expectException('PHPUnit\Framework\Error\Deprecated'); $this->expectExceptionMessage( "Isbn->validate is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx" ); $isbn = new Isbn('9782843449499'); $isbn->validate(); } public function testValidateValidIsbn() { $isbn = new Isbn('9782843449499'); $this->assertTrue($isbn->validate()); } /** * Non-regression test for Github issue #6 * https://github.com/biblys/isbn/issues/6 */ public function testValidateIsbn10WithChecksumX() { $isbn = new Isbn('80-7203-717-X'); $this->assertTrue($isbn->validate()); } /** * Non-regression test for Github issue #21 * https://github.com/biblys/isbn/issues/21 */ public function testValidateMexicanIsbn() { $isbn = new Isbn("9700764923"); $this->assertTrue($isbn->validate()); } }