zangra-dev /
bpost-api-library
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Tests\Bpost\Order\Box\Option; |
||
| 4 | |||
| 5 | use Bpost\BpostApiClient\Bpost\Order\Box\Option\Signature; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use DOMDocument; |
||
| 7 | use PHPUnit_Framework_TestCase; |
||
|
0 ignored issues
–
show
The type
PHPUnit_Framework_TestCase was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | |||
| 9 | class SignatureTest extends PHPUnit_Framework_TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Create a generic DOM Document |
||
| 13 | * |
||
| 14 | * @return DOMDocument |
||
| 15 | */ |
||
| 16 | private static function createDomDocument() |
||
| 17 | { |
||
| 18 | $document = new DOMDocument('1.0', 'utf-8'); |
||
| 19 | $document->preserveWhiteSpace = false; |
||
| 20 | $document->formatOutput = true; |
||
| 21 | |||
| 22 | return $document; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Tests Signature->toXML |
||
| 27 | */ |
||
| 28 | public function testToXML() |
||
| 29 | { |
||
| 30 | $expectedDocument = self::createDomDocument(); |
||
| 31 | $expectedDocument->appendChild( |
||
| 32 | $expectedDocument->createElement('signed') |
||
| 33 | ); |
||
| 34 | |||
| 35 | $actualDocument = self::createDomDocument(); |
||
| 36 | $signature = new Signature(); |
||
| 37 | $actualDocument->appendChild( |
||
| 38 | $signature->toXML($actualDocument) |
||
| 39 | ); |
||
| 40 | |||
| 41 | $this->assertEquals($expectedDocument, $actualDocument); |
||
| 42 | |||
| 43 | $expectedDocument = self::createDomDocument(); |
||
| 44 | $expectedDocument->appendChild( |
||
| 45 | $expectedDocument->createElement('foo:signed') |
||
| 46 | ); |
||
| 47 | |||
| 48 | $actualDocument = self::createDomDocument(); |
||
| 49 | $signature = new Signature(); |
||
| 50 | $actualDocument->appendChild( |
||
| 51 | $signature->toXML($actualDocument, 'foo') |
||
| 52 | ); |
||
| 53 | |||
| 54 | $this->assertSame($expectedDocument->saveXML(), $actualDocument->saveXML()); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths