<commit_before><?php

/**
 * This file contains the TweetGetTweetDataTest class.
 *
 * PHP Version 5.4
 *
 * @category   Libraries
 * @package    Spark
 * @subpackage Tests
 * @author     <NAME> <<EMAIL>>
 * @copyright  2013-2014, M2Mobi BV, Amsterdam, The Netherlands
 * @license    http://lunr.nl/LICENSE MIT License
 */

namespace Lunr\Spark\Twitter\Tests;

use Lunr\Spark\DataError;

/**
 * This class contains the tests for the Twitter Tweet class.
 *
 * @category   Libraries
 * @package    Spark
 * @subpackage Tests
 * @author     <NAME> <<EMAIL>>
 * @covers     Lunr\Spark\Twitter\Tweet
 */
class TweetGetTweetDataTest extends TweetTest
{

    /**
     * Test that getting tweet data returns the data if it is present.
     *
     * @param String $field Field name
     *
     * @dataProvider tweetFieldsProvider
     * @covers       Lunr\Spark\Twitter\Tweet::__call
     */
    public function testGetTweetDataReturnsDataIfPresent($field)
    {
        $this->set_reflection_property_value('data', [ $field => 'Value' ]);

        $this->assertEquals('Value', $this->class->{'get_' . $field}());
    }

    /**
     * Test that getting tweet data returns NOT_AVAILABLE if it is not present.
     *
     * @param String $field Field name
     *
     * @dataProvider tweetFieldsProvider
     * @covers       Lunr\Spark\Twitter\Tweet::__call
     */
    public function testGetTweetDataReturnsNotAvailableIfNotPresent($field)
    {
        $this->assertSame(DataError::NOT_AVAILABLE, $this->class->{'get_' . $field}());
    }

}

?><commit_msg>Spark: Adds a tests for the get_ unkown field of Tweet class<commit_after><?php

/**
 * This file contains the TweetGetTweetDataTest class.
 *
 * PHP Version 5.4
 *
 * @category   Libraries
 * @package    Spark
 * @subpackage Tests
 * @author     <NAME> <<EMAIL>>
 * @copyright  2013-2014, M2Mobi BV, Amsterdam, The Netherlands
 * @license    http://lunr.nl/LICENSE MIT License
 */

namespace Lunr\Spark\Twitter\Tests;

use Lunr\Spark\DataError;

/**
 * This class contains the tests for the Twitter Tweet class.
 *
 * @category   Libraries
 * @package    Spark
 * @subpackage Tests
 * @author     <NAME> <<EMAIL>>
 * @covers     Lunr\Spark\Twitter\Tweet
 */
class TweetGetTweetDataTest extends TweetTest
{

    /**
     * Test that getting tweet data returns the data if it is present.
     *
     * @param String $field Field name
     *
     * @dataProvider tweetFieldsProvider
     * @covers       Lunr\Spark\Twitter\Tweet::__call
     */
    public function testGetTweetDataReturnsDataIfPresent($field)
    {
        $this->set_reflection_property_value('data', [ $field => 'Value' ]);

        $this->assertEquals('Value', $this->class->{'get_' . $field}());
    }

    /**
     * Test that getting tweet data returns NOT_AVAILABLE if it is not present.
     *
     * @param String $field Field name
     *
     * @dataProvider tweetFieldsProvider
     * @covers       Lunr\Spark\Twitter\Tweet::__call
     */
    public function testGetTweetDataReturnsNotAvailableIfNotPresent($field)
    {
        $this->assertSame(DataError::NOT_AVAILABLE, $this->class->{'get_' . $field}());
    }

    /**
     * Test that getting tweet data returns UNKNOWN_FIELD in unkown field request.
     *
     * @covers Lunr\Spark\Twitter\Tweet::__call
     */
    public function testGetTweetDataReturnsUnknownDataErrorInUnkownField()
    {
        $this->assertSame(DataError::UNKNOWN_FIELD, $this->class->get_unkown());
    }

}

?>
{'fraction_non_alphanumeric': 0.12154377880184332, 'fraction_numerical': 0.006336405529953917, 'mean_word_length': 2.9242937853107343, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 36, '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': '3745728', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1095, 'n_words': 261}