mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
use composite position
This commit is contained in:
@@ -20,6 +20,13 @@ class GpsPositionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($position->isComplete());
|
||||
}
|
||||
|
||||
public function testIsCompleteCompositeWithSingleSet()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
$position->set('Latitude', 48.856578);
|
||||
$this->assertFalse($position->isCompleteComposite());
|
||||
}
|
||||
|
||||
public function testIsCompleteWithAllSet()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
@@ -30,6 +37,14 @@ class GpsPositionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($position->isComplete());
|
||||
}
|
||||
|
||||
public function testIsCompleteCompositeWithAllSet()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
$position->set('Latitude', 48.856578);
|
||||
$position->set('Longitude', 2.351828);
|
||||
$this->assertTrue($position->isCompleteComposite());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getSupportedTagNames
|
||||
*/
|
||||
@@ -89,6 +104,13 @@ class GpsPositionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(-2.351828, $position->getSignedLongitude());
|
||||
}
|
||||
|
||||
public function testGetCompositeLongitude()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
$position->set('Longitude', -2.351828);
|
||||
$this->assertEquals(-2.351828, $position->getCompositeLongitude());
|
||||
}
|
||||
|
||||
public function testGetSignedLatitude()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
@@ -109,4 +131,11 @@ class GpsPositionTest extends \PHPUnit_Framework_TestCase
|
||||
$position->set('LatitudeRef', 'S');
|
||||
$this->assertEquals(-48.856578, $position->getSignedLatitude());
|
||||
}
|
||||
|
||||
public function testGetCompositeLatitude()
|
||||
{
|
||||
$position = new GpsPosition();
|
||||
$position->set('Latitude', -48.856578);
|
||||
$this->assertEquals(-48.856578, $position->getCompositeLatitude());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user