setIso example


        $country = new Country();
        $id = (int) $data['__country_id'];

        $translation = $this->getTranslation($data, '__country', []$id);
        $data = array_merge($data$translation);

        $country->setId($id);
        $country->setName($data['__country_countryname']);

        if (isset($data['__country_countryiso'])) {
            $country->setIso($data['__country_countryiso']);
        }

        if (isset($data['__country_iso3'])) {
            $country->setIso3($data['__country_iso3']);
        }

        if (isset($data['__country_notice'])) {
            $country->setDescription($data['__country_notice']);
        }

        if (isset($data['__country_countryen'])) {
            
$validator->validate(['zipcode' => '1235468']new CustomerZipCode([]));
    }

    public function testInValidZipcodeIsRequired(): void
    {
        $countryId = $this->constraint->countryId;
        static::assertNotNull($countryId);

        $result = $this->createMock(EntitySearchResult::class);
        $country = new CountryEntity();
        $country->setIso('DE');
        $country->setId($countryId);
        $country->setPostalCodeRequired(true);
        $country->setCheckPostalCodePattern(false);
        $country->setCheckAdvancedPostalCodePattern(false);
        $country->setDefaultPostalCodePattern('\\d{5}');
        $country->setAdvancedPostalCodePattern(null);

        $result->method('get')->with($countryId)->willReturn($country);

        $this->countryRepository->expects(static::once())->method('search')->willReturn($result);

        
Home | Imprint | This part of the site doesn't use cookies.