<commit_before><?php
/*
 * Enject Library Tests
 * Copyright 2010 <NAME>
 * Licensed under: GNU Lesser Public License 2.1 or later
 *//**
 * @author <NAME> <<EMAIL>>
 * @copyright 2010 (c) <NAME>
 * @license http://www.opensource.org/licenses/lgpl-2.1.php
 * @package Test_Enject
 */

require_once 'Enject/TestCase.php';
/*
 * @see Enject_Blueprint_Default
 */
class Test_Enject_Value_Builder_Test
	extends Test_Enject_TestCase
{
	/**
	 * @return Enject_Value_Builder 
	 */
	protected function _getInstance()
	{
		return new Enject_Value_Builder();
	}

	/**
	 * Ensure that a test instance may be created
	 */
	function testInstance()
	{
		$this->assertClassExists('Enject_Value_Builder');
		$builder = new Enject_Value_Builder();
	}

	/**
	 * Ensure that a container can be created
	 */
	function testContainerInstance()
	{
		$this->assertClassExists('Enject_Container');
		$container = new Enject_Container();
	}

	/**
	 * Ensures that the mock target class exists and can be created
	 */
	function testTargetInstance()
	{
		$this->assertClassExists('Test_Enject_Target_Mock');
		$target = new Test_Enject_Target_Mock();
	}

	/**
	 * Ensures that the mock value builder class exists and can be created
	 */
	function testValueInstance()
	{
		$this->assertClassExists('Test_Enject_Value_Mock');
		$target = new Test_Enject_Value_Mock();
	}

	/**
	 * @depends testInstance
	 */
	function testAddInjection()
	{
		$builder = $this->_getInstance();
		$this->assertSame($builder, $builder->addInjection('setValue', $this));
	}

	/**
	 * @depends testInstance
	 */
	function testSetClassname()
	{
		$builder = $this->_getInstance();
		$this->assertSame($builder, $builder->setClassName('Enject_Value_Mock'));
	}

	/**
	 * @depends testInstance
	 * @depends testContainerInstance
	 */
	function testSetContainer()
	{
		$builder = $this->_getInstance();
		$container = $builder->setContainer(new Enject_Container());
		$this->assertSame($builder, $container);
	}

	/**
	 * @depends testSetClassname
	 */
	function testGetClassname()
	{
		$builder = $this->_getInstance();
		$builder->setClassName('Enject_Value_Mock');
		$this->assertEquals('Enject_Value_Mock', $builder->getClassname());
	}

	/**
	 * @depends testInstance
	 * @depends testContainerInstance
	 */
	function testGetContainer()
	{
		$builder = $this->_getInstance();
		$container = new Enject_Container();
		$builder->setContainer($container);
		$this->assertSame($container, $builder->getContainer());
	}

	/**
	 * @depends testInstance
	 */
	function testGetInjectionCollection()
	{
		$builder = $this->_getInstance();
		$return = $builder->getInjectionCollection();
		$this->assertType('Enject_Injection_Collection_Default', $return);
	}

	/**
	 * @depends testInstance<commit_msg>Test_Enject_Value_Builder: update location of testGetInjectionCollection()<commit_after><?php
/*
 * Enject Library Tests
 * Copyright 2010 <NAME>
 * Licensed under: GNU Lesser Public License 2.1 or later
 *//**
 * @author <NAME> <<EMAIL>>
 * @copyright 2010 (c) <NAME>
 * @license http://www.opensource.org/licenses/lgpl-2.1.php
 * @package Test_Enject
 */

require_once 'Enject/TestCase.php';
/*
 * @see Enject_Blueprint_Default
 */
class Test_Enject_Value_Builder_Test
	extends Test_Enject_TestCase
{
	/**
	 * @return Enject_Value_Builder 
	 */
	protected function _getInstance()
	{
		return new Enject_Value_Builder();
	}

	/**
	 * Ensure that a test instance may be created
	 */
	function testInstance()
	{
		$this->assertClassExists('Enject_Value_Builder');
		$builder = new Enject_Value_Builder();
	}

	/**
	 * Ensure that a container can be created
	 */
	function testContainerInstance()
	{
		$this->assertClassExists('Enject_Container');
		$container = new Enject_Container();
	}

	/**
	 * Ensures that the mock target class exists and can be created
	 */
	function testTargetInstance()
	{
		$this->assertClassExists('Test_Enject_Target_Mock');
		$target = new Test_Enject_Target_Mock();
	}

	/**
	 * Ensures that the mock value builder class exists and can be created
	 */
	function testValueInstance()
	{
		$this->assertClassExists('Test_Enject_Value_Mock');
		$target = new Test_Enject_Value_Mock();
	}

	/**
	 * @depends testInstance
	 */
	function testAddInjection()
	{
		$builder = $this->_getInstance();
		$this->assertSame($builder, $builder->addInjection('setValue', $this));
	}

	/**
	 * @depends testInstance
	 */
	function testGetInjectionCollection()
	{
		$builder = $this->_getInstance();
		$return = $builder->getInjectionCollection();
		$this->assertType('Enject_Injection_Collection_Default', $return);
	}

	/**
	 * @depends testInstance
	 */
	function testSetClassname()
	{
		$builder = $this->_getInstance();
		$this->assertSame($builder, $builder->setClassName('Enject_Value_Mock'));
	}

	/**
	 * @depends testInstance
	 * @depends testContainerInstance
	 */
	function testSetContainer()
	{
		$builder = $this->_getInstance();
		$container = $builder->setContainer(new Enject_Container());
		$this->assertSame($builder, $container);
	}

	/**
	 * @depends testSetClassname
	 */
	function testGetClassname()
	{
		$builder = $this->_getInstance();
		$builder->setClassName('Enject_Value_Mock');
		$this->assertEquals('Enject_Value_Mock', $builder->getClassname());
	}

	/**
	 * @depends testInstance
	 * @depends testContainerInstance
	 */
	function testGetContainer()
	{
		$builder = $this->_getInstance();
		$container = new Enject_Container();
		$builder->setContainer($container);
		$this->assertSame($container, $builder->getContainer());
	}

	/**
	 * @depends testInstance
{'fraction_non_alphanumeric': 0.14697926059513075, 'fraction_numerical': 0.004328223624887286, 'mean_word_length': 4.607684529828109, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 61, 'https://': 0, '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': '1201987', 'n_tokens_mistral': 1868, 'n_tokens_neox': 1729, 'n_words': 343}