<commit_before><?php
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\SessionsTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Chronos\Chronos;

/**
 * App\Model\Table\SessionsTable Test Case
 */
class SessionsTableTest extends TestCase
{

    /**
     * Test subject
     *
     * @var \App\Model\Table\SessionsTable
     */
    public $SessionsTable;

    /**
     * Fixtures
     *
     * @var array
     */
    public $fixtures = [
        'app.sessions',
        'app.projects',
        'app.clients',
        'app.fiscal_data',
        'app.countries',
        'app.tickets',
        'app.invoices',
        'app.currencies',
        'app.budgets',
        'app.transactions',
        'app.states',
        'app.comments'
    ];

    /**
     * setUp method
     *
     * @return void
     */
    public function setUp()
    {
        parent::setUp();
        $config = TableRegistry::exists('Sessions') ? [] : [
            'className' => SessionsTable::class
        ];
        $this->SessionsTable = TableRegistry::get('Sessions', $config);
        
        // Set the date to match dates on fixtures
        Chronos::setTestNow(new Chronos('2017-08-13 12:00:00'));
    }

    /**
     * tearDown method
     *
     * @return void
     */
    public function tearDown()
    {
        unset($this->SessionsTable);
        
        parent::tearDown();
    }

    /**
     * Test findOngoingSessions method
     *
     * @return void
     */
    public function testFindOngoingSessions()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test findTodaysDetail method
     *
     * @return void
     */
    public function testFindTodaysDetail()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test findTodaysSummary method
     *
     * @return void
     */
    public function testFindTodaysSummary()
    {
        $summary_projects = $this->SessionsTable->find('todaysSummary');
        
        $this->assertInstanceOf('\Cake\ORM\Query', $summary_projects);
        
        $record_count = $summary_projects->count();
        
        $this->assertInternalType('int', $record_count);
        $this->assertEquals(3, $record_count);
    }

    /**
     * Test findTodaysTotal method
     *
     * @return void
     */
    public function testFindTodaysTotal()
    {
        $total = $this->SessionsTable->find('todaysTotal')->first()->total_duration;
        
        $this->assertInternalType('float', $total);
        $this->assertEquals(1192, $total);
    }

    /**
     * Test findLastDaysTotal method
     *
     * @return void
     */
    public function testFindLastDaysTotal()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test findLastProject method
     *
     * @return void
     */
    public function testFindLastProject()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    /**
     * Test beforeSave method
     *
     * @return void
     */
    public function testBeforeSave()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }
}<commit_msg>Remove incomplete tests<commit_after><?php
namespace App\Test\TestCase\Model\Table;

use App\Model\Table\SessionsTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;
use Cake\Chronos\Chronos;

/**
 * App\Model\Table\SessionsTable Test Case
 */
class SessionsTableTest extends TestCase
{

    /**
     * Test subject
     *
     * @var \App\Model\Table\SessionsTable
     */
    public $SessionsTable;

    /**
     * Fixtures
     *
     * @var array
     */
    public $fixtures = [
        'app.sessions',
        'app.projects',
        'app.clients',
        'app.fiscal_data',
        'app.countries',
        'app.tickets',
        'app.invoices',
        'app.currencies',
        'app.budgets',
        'app.transactions',
        'app.states',
        'app.comments'
    ];

    /**
     * setUp method
     *
     * @return void
     */
    public function setUp()
    {
        parent::setUp();
        $config = TableRegistry::exists('Sessions') ? [] : [
            'className' => SessionsTable::class
        ];
        $this->SessionsTable = TableRegistry::get('Sessions', $config);
        
        // Set the date to match dates on fixtures
        Chronos::setTestNow(new Chronos('2017-08-13 12:00:00'));
    }

    /**
     * tearDown method
     *
     * @return void
     */
    public function tearDown()
    {
        unset($this->SessionsTable);
        
        parent::tearDown();
    }

    /**
     * Test findTodaysSummary method
     *
     * @return void
     */
    public function testFindTodaysSummary()
    {
        $summary_projects = $this->SessionsTable->find('todaysSummary');
        
        $this->assertInstanceOf('\Cake\ORM\Query', $summary_projects);
        
        $record_count = $summary_projects->count();
        
        $this->assertInternalType('int', $record_count);
        $this->assertEquals(3, $record_count);
    }

    /**
     * Test findTodaysTotal method
     *
     * @return void
     */
    public function testFindTodaysTotal()
    {
        $total = $this->SessionsTable->find('todaysTotal')->first()->total_duration;
        
        $this->assertInternalType('float', $total);
        $this->assertEquals(1192, $total);
    }
}
{'fraction_non_alphanumeric': 0.13727678571428573, 'fraction_numerical': 0.007068452380952381, 'mean_word_length': 1.970718232044199, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '1209230', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1628, 'n_words': 273}