<commit_before><?php

namespace CultuurNet\UDB3\Place\Events;

use CultuurNet\Geocoding\Coordinate\Coordinates;
use CultuurNet\Geocoding\Coordinate\Latitude;
use CultuurNet\Geocoding\Coordinate\Longitude;

class GeoCoordinatesUpdatedTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function it_can_be_serialized_and_deserialized()
    {
        $event = new GeoCoordinatesUpdated(
            'f281bc85-3ee4-43a7-b42d-a8982ec9bbc4',
            new Coordinates(
                new Latitude(0.00456),
                new Longitude(-1.24567)
            )
        );

        $expectedArray = [
            'place_id' => 'f281bc85-3ee4-43a7-b42d-a8982ec9bbc4',
            'coordinates' => [
                'lat' => 0.00456,
                'long' => -1.24567,
            ],
        ];

        $actualArray = $event->serialize();

        $deserialized = GeoCoordinatesUpdated::deserialize($actualArray);

        $this->assertEquals($expectedArray, $actualArray);
        $this->assertEquals($event, $deserialized);
    }
}
<commit_msg>III-1777 Change variable naming inside GeoCoordinatesUpdatedTest.<commit_after><?php

namespace CultuurNet\UDB3\Place\Events;

use CultuurNet\Geocoding\Coordinate\Coordinates;
use CultuurNet\Geocoding\Coordinate\Latitude;
use CultuurNet\Geocoding\Coordinate\Longitude;

class GeoCoordinatesUpdatedTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function it_can_be_serialized_and_deserialized()
    {
        $expectedEvent = new GeoCoordinatesUpdated(
            'f281bc85-3ee4-43a7-b42d-a8982ec9bbc4',
            new Coordinates(
                new Latitude(0.00456),
                new Longitude(-1.24567)
            )
        );

        $expectedArray = [
            'place_id' => 'f281bc85-3ee4-43a7-b42d-a8982ec9bbc4',
            'coordinates' => [
                'lat' => 0.00456,
                'long' => -1.24567,
            ],
        ];

        $actualArray = $expectedEvent->serialize();

        $event = GeoCoordinatesUpdated::deserialize($expectedArray);

        $this->assertEquals($expectedArray, $actualArray);
        $this->assertEquals($expectedEvent, $event);
    }
}

{'fraction_non_alphanumeric': 0.1158371040723982, 'fraction_numerical': 0.05701357466063348, 'mean_word_length': 2.31981981981982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5706128', 'n_tokens_mistral': 778, 'n_tokens_neox': 701, 'n_words': 91}