<commit_before><?php

namespace JimLind\TiVo\Tests\Factory;

use JimLind\TiVo\Factory\ShowListFactory;

/**
 * Test the factory for show models.
 */
class ShowFactoryListTest extends \PHPUnit_Framework_TestCase
{
    protected $fixture = null;

    /**
     * Setup the PHPUnit test.
     */
    public function setup()
    {
        $this->fixture = new ShowListFactory();
    }

    public function testNothing()
    {
        $count     = rand(1,10);
        $simpleXml = simplexml_load_string('<xml><Details /></xml>');
        $xmlList   = array_fill(0, $count, $simpleXml);

        $showList = $this->fixture->createShowListFromXmlList($xmlList);

        $this->assertCount($count, $showList);
        $this->assertContainsOnlyInstancesOf('JimLind\TiVo\Model\Show', $showList);
    }

}<commit_msg>Codesniffed<commit_after><?php

namespace JimLind\TiVo\Tests\Factory;

use JimLind\TiVo\Factory\ShowListFactory;

/**
 * Test the factory for show models.
 */
class ShowFactoryListTest extends \PHPUnit_Framework_TestCase
{
    protected $fixture = null;

    /**
     * Setup the PHPUnit test.
     */
    public function setup()
    {
        $this->fixture = new ShowListFactory();
    }

    /**
     * Tests that list of shows is created.
     */
    public function testCreate()
    {
        $count     = rand(1, 10);
        $simpleXml = simplexml_load_string('<xml><Details /></xml>');
        $xmlList   = array_fill(0, $count, $simpleXml);

        $showList = $this->fixture->createShowListFromXmlList($xmlList);

        $this->assertCount($count, $showList);
        $this->assertContainsOnlyInstancesOf('JimLind\TiVo\Model\Show', $showList);
    }

}
{'fraction_non_alphanumeric': 0.137125748502994, 'fraction_numerical': 0.004790419161676647, 'mean_word_length': 2.895104895104895, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '2396979', 'n_tokens_mistral': 540, 'n_tokens_neox': 514, 'n_words': 100}