forked from egeloen/IvoryGoogleMapBundle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add encoded polyline entity + ORM mapping
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Ivory\GoogleMapBundle\Entity; | ||
|
||
use Ivory\GoogleMapBundle\Model\Overlays\EncodedPolyline as BaseEncodedPolyline; | ||
|
||
/** | ||
* Encoded Polyline Entity | ||
* | ||
* @author GeLo <geloen.eric@gmail.com> | ||
*/ | ||
class EncodedPolyline extends BaseEncodedPolyline | ||
{ | ||
/** | ||
* Create an encoded polyline | ||
* | ||
* @param string $value | ||
*/ | ||
public function __construct($value = null) | ||
{ | ||
parent::__construct($value); | ||
} | ||
} | ||
|
||
?> |
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | ||
|
||
<mapped-superclass name="Ivory\GoogleMapBundle\Entity\EncodedPolyline" table="ivory_encoded_polyline"> | ||
<field name="javascriptVariable" column="javascript_variable" type="string" length="100" /> | ||
<field name="value" type="text" /> | ||
<field name="options" type="array" /> | ||
</mapped-superclass> | ||
|
||
</doctrine-mapping> |
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,22 @@ | ||
<?php | ||
|
||
namespace Ivory\GoogleMapBundle\Tests\Entity; | ||
|
||
use Ivory\GoogleMapBundle\Entity\EncodedPolyline; | ||
|
||
/** | ||
* Encoded Polyline Test | ||
* | ||
* @author GeLo <geloen.eric@gmail.com> | ||
*/ | ||
class EncodedPolylineTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* Checks the encoded polyline constuctor | ||
*/ | ||
public function testConstructor() | ||
{ | ||
$encodedPolylineEntityTest = new EncodedPolyline(); | ||
$this->assertInstanceOf('Ivory\GoogleMapBundle\Model\Overlays\EncodedPolyline', $encodedPolylineEntityTest); | ||
} | ||
} |