<commit_before><?php

use Dash\Collection;
use Dash\Container;

class propertyTest extends PHPUnit_Framework_TestCase
{
	/**
	 * @dataProvider casesForProperty
	 */
	public function testProperty($collection, $path, $expected)
	{
		$getter = Collection\property($path, 'default');
		$this->assertEquals($expected, $getter($collection));
	}

	public function casesForProperty()
	{
		return array(
			'With a valid path for an object' => array(
				(object) array(
					'a' => (object) array(
						'b' => (object) array(
							'c' => 'value'
						)
					)<commit_msg>Remove unused import<commit_after><?php

use Dash\Collection;

class propertyTest extends PHPUnit_Framework_TestCase
{
	/**
	 * @dataProvider casesForProperty
	 */
	public function testProperty($collection, $path, $expected)
	{
		$getter = Collection\property($path, 'default');
		$this->assertEquals($expected, $getter($collection));
	}

	public function casesForProperty()
	{
		return array(
			'With a valid path for an object' => array(
				(object) array(
					'a' => (object) array(
						'b' => (object) array(
							'c' => 'value'
						)
					)
{'fraction_non_alphanumeric': 0.14451382694023193, 'fraction_numerical': 0.0, 'mean_word_length': 3.7542372881355934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1863548', 'n_tokens_mistral': 418, 'n_tokens_neox': 345, 'n_words': 88}