}
$reader = new XMPReader;
$reader->parse( $xmp );
- $this->assertEquals( $expected, $reader->getResults(), $info );
+ $this->assertEquals( $expected, $reader->getResults(), $info, 0.0000000001 );
}
public function dataXMPParse() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/' ;
+ $xmpPath = __DIR__ . '/../../data/xmp/' ;
$data = array();
// $xmpFiles format: array of arrays with first arg file base name,
array( 'utf32BE', 'UTF-32BE encoding' ),
array( 'utf32LE', 'UTF-32LE encoding' ),
array( 'xmpExt', 'Extended XMP missing second part' ),
+ array( 'gps', 'Handling of exif GPS parameters in XMP' ),
);
foreach( $xmpFiles as $file ) {
$xmp = file_get_contents( $xmpPath . $file[0] . '.xmp' );
* world example file to double check the support for this is right.
*/
function testExtendedXMP() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
* and thus should only return the StandardXMP, not the ExtendedXMP.
*/
function testExtendedXMPWithWrongGUID() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
* which should cause it to ignore the ExtendedXMP packet.
*/
function testExtendedXMPMissingPacket() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );