-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from duncan3dc/add-unit-testing
Add unit testing to prevent regressions
- Loading branch information
Showing
6 changed files
with
31 additions
and
23 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<phpunit bootstrap="tests/bootstrap.php"> | ||
<testsuite> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
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,15 @@ | ||
<?php | ||
|
||
namespace Khanamiryan\QrCodeTests; | ||
|
||
class QrReaderTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testText1() | ||
{ | ||
$image = __DIR__ . "/qrcodes/hello_world.png"; | ||
|
||
$qrcode = new \QrReader($image); | ||
$this->assertSame("Hello world!", $qrcode->text()); | ||
} | ||
} |
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,3 @@ | ||
<?php | ||
|
||
require __DIR__ . "/../vendor/autoload.php"; |
File renamed without changes