-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the biblys/isbn package. | ||
* | ||
* (c) Clément Bourgoin | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
ini_set('display_errors', 1); | ||
ini_set('display_startup_errors', 1); | ||
error_reporting(E_ALL); | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Biblys\Isbn\Isbn; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class testIsParsable extends TestCase | ||
{ | ||
public function testParsableIsbn() | ||
{ | ||
$isParsable = Isbn::isParsable("9782207258040"); | ||
|
||
$this->assertTrue($isParsable); | ||
} | ||
|
||
public function testUnparsableIsbn() | ||
{ | ||
$isParsable = Isbn::isParsable("9782SPI258040"); | ||
|
||
$this->assertFalse($isParsable); | ||
} | ||
} |