This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
forked from dompdf/dompdf
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
308b3f9
commit 01ee252
Showing
6 changed files
with
72 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
.DS_Store | ||
composer.phar | ||
composer.lock | ||
phpunit.xml | ||
vendor | ||
.idea | ||
.project | ||
lib/fonts/*.afm.php | ||
lib/fonts/*.ufm.php | ||
lib/fonts/log.htm | ||
lib/fonts/log.htm |
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 @@ | ||
language: php | ||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
|
||
before_script: | ||
## Composer | ||
- curl -s http://getcomposer.org/installer | php | ||
- php composer.phar install |
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 |
---|---|---|
|
@@ -12,12 +12,23 @@ | |
{ | ||
"name": "Brian Sweeney", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Gabriel Bull", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"classmap": ["include/"] | ||
"classmap": ["include/"], | ||
"psr-0" : { | ||
"DomPdf" : "include/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=5.3.0", | ||
"phenx/php-font-lib": "0.2.*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*" | ||
} | ||
} | ||
} |
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,16 @@ | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="test/bootstrap.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false"> | ||
<testsuites> | ||
<testsuite name="DomPdf Test Suite"> | ||
<directory>./test/DomPdf/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</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,18 @@ | ||
<?php | ||
namespace DomPdf\Tests; | ||
|
||
use PHPUnit_Framework_TestCase; | ||
use DomPdf\Autoloader; | ||
|
||
class AutoloaderTest extends PHPUnit_Framework_TestCase | ||
{ | ||
public function testAutoload() | ||
{ | ||
$declared = get_declared_classes(); | ||
$declaredCount = count($declared); | ||
Autoloader::autoload('Foo'); | ||
$this->assertEquals($declaredCount, count(get_declared_classes()), 'DomPdf\\Autoloader::autoload() is trying to load classes outside of the DomPdf namespace'); | ||
Autoloader::autoload('DomPdf\Frame\FrameList'); // TODO change this class to the main DomPdf class when it is namespaced | ||
$this->assertTrue(in_array('DomPdf\Frame\FrameList', get_declared_classes()), 'DomPdf\\Autoloader::autoload() failed to autoload the DomPdf\Frame\FrameList class'); | ||
} | ||
} |
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,12 @@ | ||
<?php | ||
|
||
define('DOMPDF_ENABLE_AUTOLOAD', false); | ||
require_once __DIR__ . '/../dompdf_config.inc.php'; | ||
|
||
DomPdf\Autoloader::register(); | ||
|
||
if (!@include_once __DIR__ . '/../vendor/autoload.php') { | ||
if (!@include_once __DIR__ . '/../../../autoload.php') { | ||
trigger_error("Unable to load dependencies", E_USER_ERROR); | ||
} | ||
} |