<commit_before><?php

namespace spec\SearchApi\Support;

use SearchApi;
use SearchApi\Models as Models;
use SearchApi\Providers as Providers;
use SearchApi\Support as Support;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

/**
 * GeoCoderURLBuilderSpec - Spec integration test for the GeoCoderURLBuilder (higher level functions)
 */
class GoogleURLBuilderSpec extends ObjectBehavior {
  private $good_coords;

  function __construct() {
    $this->good_coords = new Models\GeoCoordinate( 40.714224, - 73.961452 );
  }

  function it_is_initializable() {
    $this->beConstructedWith( $this->good_coords );
    $this->shouldHaveType( 'SearchApi\Support\GoogleURLBuilder' );
  }

  // specific builder tests
  function it_should_return_a_string_from_the_google_builder() {
    $this-> beConstructedWith( $this->good_coords );
    $result = $this->google_url();
    $result->shouldBeString();
    $result->shouldBe( 'https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452' );
  }
  // end of builder tests
}
<commit_msg>update test to construct without coords variable<commit_after><?php

namespace spec\SearchApi\Support;

use SearchApi;
use SearchApi\Models as Models;
use SearchApi\Providers as Providers;
use SearchApi\Support as Support;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

/**
 * GeoCoderURLBuilderSpec - Spec integration test for the GeoCoderURLBuilder (higher level functions)
 */
class GoogleURLBuilderSpec extends ObjectBehavior {
  private $good_coords;

  function __construct() {
    $this->good_coords = new Models\GeoCoordinate( 40.714224, - 73.961452 );
  }

  function it_is_initializable() {
    $this->beConstructedWith();
    $this->shouldHaveType( 'SearchApi\Support\GoogleURLBuilder' );
  }

  // specific builder tests
  function it_should_return_a_string_from_the_google_builder() {
    $this-> beConstructedWith();
    $this->set_coords( $this->good_coords );
    $result = $this->google_url();
    $result->shouldBeString();
    $result->shouldBe( 'https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452' );
  }
  // end of builder tests
}

{'fraction_non_alphanumeric': 0.11866791744840526, 'fraction_numerical': 0.0300187617260788, 'mean_word_length': 4.642857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '3866535', 'n_tokens_mistral': 740, 'n_tokens_neox': 685, 'n_words': 140}