<commit_before><?php

require_once '../Mustache.php';

class MustacheCallTest extends PHPUnit_Framework_TestCase {

	public function testCallEatsContext() {
		$foo = new Foo();
		$foo->name = 'Bob';

		$template = '{{# foo }}{{ label }}: {{ name }}{{/ foo }}';
		$data = array('label' => 'name', 'foo' => $foo);
		$m = new Mustache($template, $data);

		$this->assertEquals('name: Bob', $m->render());
	}
}

class Foo {
	public $name;
	public function __call($method, $args) {
		return 'unknown value';
	}
}<commit_msg>Rename MustacheCallTest Foo class so it can be run with other tests<commit_after><?php

require_once '../Mustache.php';

class MustacheCallTest extends PHPUnit_Framework_TestCase {

	public function testCallEatsContext() {
		$foo = new ClassWithCall();
		$foo->name = 'Bob';

		$template = '{{# foo }}{{ label }}: {{ name }}{{/ foo }}';
		$data = array('label' => 'name', 'foo' => $foo);
		$m = new Mustache($template, $data);

		$this->assertEquals('name: Bob', $m->render());
	}
}

class ClassWithCall {
	public $name;
	public function __call($method, $args) {
		return 'unknown value';
	}
}
{'fraction_non_alphanumeric': 0.19424460431654678, 'fraction_numerical': 0.0, 'mean_word_length': 4.455882352941177, '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': '208997', 'n_tokens_mistral': 403, 'n_tokens_neox': 378, 'n_words': 97}