<commit_before><?php
require_once __DIR__ . '/../../../../TestCase.php';

class CM_Paging_Splitfeature_AllTest extends TestCase {

	public static function setUpBeforeClass() {
	}

	public static function tearDownAfterClass() {
		TH::clearEnv();
	}

	public function testPaging() {
		CM_Model_Splitfeature::create(array('name' => 'foo', 'percentage' => 50));
		CM_Model_Splitfeature::create(array('name' => 'bar', 'percentage' => 10));
		CM_Model_Splitfeature::create(array('name' => 'foobar', 'percentage' => 30));
		CM_Model_Splitfeature::create(array('name' => 'foofoobar', 'percentage' => 88));

		$paging = new CM_Paging_Splitfeature_All();
		$this->assertSame(4, $paging->getCount());
	}
}<commit_msg>t509: Make paging test better<commit_after><?php
require_once __DIR__ . '/../../../../TestCase.php';

class CM_Paging_Splitfeature_AllTest extends TestCase {

	public static function setUpBeforeClass() {
	}

	public static function tearDownAfterClass() {
		TH::clearEnv();
	}

	public function testPaging() {
		CM_Model_Splitfeature::create(array('name' => 'foo', 'percentage' => 50));
		CM_Model_Splitfeature::create(array('name' => 'bar', 'percentage' => 10));
		$paging = new CM_Paging_Splitfeature_All();
		$this->assertInstanceOf('CM_Model_Splitfeature', $paging->getItem(0));
		$this->assertSame(2, count($paging->getItems()));

		CM_Model_Splitfeature::create(array('name' => 'foobar', 'percentage' => 30));
		$splitfeature = CM_Model_Splitfeature::create(array('name' => 'foofoobar', 'percentage' => 88));
		$paging = new CM_Paging_Splitfeature_All();
		$this->assertSame(4, count($paging->getItems()));

		$splitfeature->delete();
		$paging = new CM_Paging_Splitfeature_All();
		$this->assertSame(3, count($paging->getItems()));
	}
}
{'fraction_non_alphanumeric': 0.1859267734553776, 'fraction_numerical': 0.013729977116704805, 'mean_word_length': 6.2272727272727275, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, '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': '5388752', 'n_tokens_mistral': 628, 'n_tokens_neox': 580, 'n_words': 100}