<commit_before><?php

namespace Geocoder\Tests\Provider;

use Geocoder\Tests\TestCase;
use Geocoder\Provider\OGDViennaAustriaProvider;

/**
 * @author <NAME> <www.harm.co.at>
 * Data source: City of Vienna, http://data.wien.gv.at
 */
class OGDViennaAustriaProviderTest extends TestCase
{
    public function testGetName()
    {
        $provider = new OGDViennaAustriaProvider($this->getMockAdapter($this->never()));
        $this->assertEquals('ogd_vienna_austria', $provider->getName());
    }

    /**
     * @expectedException \Geocoder\Exception\NoResult
     * @expectedExceptionMessage Could not execute query http://data.wien.gv.at/daten/OGDAddressService.svc/GetAddressInfo?CRS=EPSG:4326&Address=Stephansplatz
     */
    public function testGeocodeWithAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getMockAdapter());
        $provider->geocode('Stephansplatz');
    }

    /**
     * @expectedException \Geocoder\Exception\NoResult
     * @expectedExceptionMessage Could not execute query http://data.wien.gv.at/daten/OGDAddressService.svc/GetAddressInfo?CRS=EPSG:4326&Address=yyyyyyy
     */
    public function testGeocodeWithWrongAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getAdapter());
        $provider->geocode('yyyyyyy');
    }

    public function testGeocodeWithRealAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getAdapter());
        $result   = $provider->geocode('Stephansplatz');<commit_msg>fixed failing tests<commit_after><?php

namespace Geocoder\Tests\Provider;

use Geocoder\Tests\TestCase;
use Geocoder\Provider\OGDViennaAustriaProvider;

/**
 * @author <NAME> <www.harm.co.at>
 * Data source: City of Vienna, http://data.wien.gv.at
 */
class OGDViennaAustriaProviderTest extends TestCase
{
    public function testGetName()
    {
        $provider = new OGDViennaAustriaProvider($this->getMockAdapter($this->never()));
        $this->assertEquals('ogd_vienna_austria', $provider->getName());
    }

    /**
     * @expectedException \Geocoder\Exception\NoResult
     * @expectedExceptionMessage Could not execute query https://data.wien.gv.at/daten/OGDAddressService.svc/GetAddressInfo?CRS=EPSG:4326&Address=Stephansplatz
     */
    public function testGeocodeWithAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getMockAdapter());
        $provider->geocode('Stephansplatz');
    }

    /**
     * @expectedException \Geocoder\Exception\NoResult
     * @expectedExceptionMessage Could not execute query https://data.wien.gv.at/daten/OGDAddressService.svc/GetAddressInfo?CRS=EPSG:4326&Address=yyyyyyy
     */
    public function testGeocodeWithWrongAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getAdapter());
        $provider->geocode('yyyyyyy');
    }

    public function testGeocodeWithRealAddress()
    {
        $provider = new OGDViennaAustriaProvider($this->getAdapter());
        $result   = $provider->geocode('Stephansplatz');
{'fraction_non_alphanumeric': 0.128, 'fraction_numerical': 0.005333333333333333, 'mean_word_length': 3.9603305785123966, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5830704', 'n_tokens_mistral': 983, 'n_tokens_neox': 944, 'n_words': 133}