<commit_before><?php
/**
 * Distical
 *
 * Distical is a simple distance calculator library for PHP 5.3+ which
 * amongst other things can calculate the distance between two or more lat/long
 * co-ordinates.
 *
 * @author <NAME> <<EMAIL>>
 * @version 2.0.0
 * @license http://opensource.org/licenses/MIT
 * @link https://github.com/bobsta63/distical
 * @link http://www.bobbyallen.me
 *
 */
use \Ballen\Distical\Calculator;
use \Ballen\Distical\Entities\LatLong;
use \PHPUnit_Framework_TestCase;

class DisticalTest extends PHPUnit_Framework_TestCase
{

    public function testBetweenUsingConstructorToString()
    {
        return true;
    }

    public function testBetweenUsingConstructorToMiles()
    {
        return true;
    }

    public function testBetweenToString()
    {
        return false;
    }

    public function testBetweenToKilometers()
    {
        return true;
    }

    public function testBetweenToMiles()
    {
        return false;
    }

    public function testBetweenToNauticalMiles()
    {
        return true;
    }
}<commit_msg>Added DisticalTest class methods for automating the main class tests.<commit_after><?php
/**
 * Distical
 *
 * Distical is a simple distance calculator library for PHP 5.3+ which
 * amongst other things can calculate the distance between two or more lat/long
 * co-ordinates.
 *
 * @author <NAME> <<EMAIL>>
 * @version 2.0.0
 * @license http://opensource.org/licenses/MIT
 * @link https://github.com/bobsta63/distical
 * @link http://www.bobbyallen.me
 *
 */
use \Ballen\Distical\Calculator;
use \Ballen\Distical\Entities\LatLong;
use \PHPUnit_Framework_TestCase;

class DisticalTest extends PHPUnit_Framework_TestCase
{

    protected $latlong1;
    protected $latlong2;
    protected $latlong3;
    protected $latlong4;

    public function __construct()
    {
        $this->latlong1 = new LatLong(52.005497, 1.045748);
        $this->latlong2 = new LatLong(52.052728, 1.160446);
    }

    public function testBetweenUsingConstructorToString()
    {
        $calculator = new Calculator($this->latlong1, $this->latlong2);
        $this->assertEquals(9.4449247131313214, $calculator->get()->asKilometres());
    }

    public function testBetweenUsingConstructorToMiles()
    {
        $calculator = new Calculator($this->latlong1, $this->latlong2);
        $this->assertEquals(5.86880412733486675, $calculator->get()->asMiles());
    }

    public function testBetweenToString()
    {
        $calculator = new Calculator;
        $calculator->between($this->latlong1, $this->latlong2);
        $this->assertEquals('9.4449247131313', $calculator->get()->__toString());
    }

    public function testBetweenToKilometers()
    {
        $calculator = new Calculator;
        $calculator->between($this->latlong1, $this->latlong2);
        $this->assertEquals(9.4449247131313214, $calculator->get()->asKilometres());
    }

    public function testBetweenToMiles()
    {
        $calculator = new Calculator;
        $calculator->between($this->latlong1, $this->latlong2);
        $this->assertEquals(5.86880412733486675, $calculator->get()->asMiles());
    }

    public function testBetweenToNauticalMiles()
    {
        $calculator = new Calculator;
        $calculator->between($this->latlong1, $this->latlong2);
        $this->assertEquals(5.0998513526780807, $calculator->get()->asNauticalMiles());
    }
}
{'fraction_non_alphanumeric': 0.12396449704142012, 'fraction_numerical': 0.048224852071005915, 'mean_word_length': 3.2906091370558377, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 45, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6018965', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1036, 'n_words': 210}