expectException('PHPUnit\Framework\Error\Deprecated'); $this->expectExceptionMessage( "Isbn->isValid is deprecated and will be removed in the future. Use Isbn::validateAs… methods instead. Learn more: https://git.io/JtAEx" ); $isbn = new Isbn('9782207258040'); $isbn->isValid(); } public function testIsValid() { $isbn = new Isbn('9782207258040'); $this->assertTrue($isbn->isValid()); } public function testIsNotValid() { $invalid = new Isbn('5780AAC728440'); $this->assertFalse($invalid->isValid()); } public function testIsbn10WithChecksumX() { $isbn = new ISBN('80-7203-717-X'); $this->assertTrue($isbn->isValid()); } public function testValidateMexicanIsbn() { $isbn = new Isbn("9700764923"); $this->assertTrue($isbn->isValid()); } }