コード例 #1
0
    public function testRender()
    {
        $markerImage = new MarkerImage();
        $markerImage->setJavascriptVariable('markerImage');
        $markerImage->setUrl('url');
        $markerImage->setSize(1, 2);
        $markerImage->getSize()->setJavascriptVariable('size');
        $markerImage->setOrigin(3, 4);
        $markerImage->getOrigin()->setJavascriptVariable('origin');
        $markerImage->setAnchor(5, 6);
        $markerImage->getAnchor()->setJavascriptVariable('anchor');
        $markerImage->setScaledSize(7, 8);
        $markerImage->getScaledSize()->setJavascriptVariable('scaled_size');
        $expected = <<<EOF
markerImage = new google.maps.MarkerImage("url", size, origin, anchor, scaled_size);

EOF;
        $this->assertSame($expected, $this->markerImageHelper->render($markerImage));
    }