<commit_before><?php
namespace qcode\eventCalendar;

/**
 * A testclass
 *
 */
class EventDatabase extends \Mos\Database\CDatabaseBasic{

    /**
     * My name is - from database.
     *
     * @return string
     *
     */
    public function getNameFromDatabase()
    {
        $this->select("name")
            ->from("test")
            ->where("id = ?")
        ;

        $res = $this->executeFetchAll([1]);
        $name = isset($res[0]->name) ? $res[0]->name : false;
        return $name;
    }

}

class EventCalendarTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @test
     *
     */

    static private $event;
    const NAME =  "test";

    /**
     * setUpBeforeClass, called once for all tests in this class.
     *
     * @return void
     *
     */
    public static function setUpBeforeClass()
    {
        self::$event = new EventDatabase();
        self::$event->setOptions(['dsn' => 'sqlite::memory:', "verbose" => false]);
        self::$event->connect();
        self::$event->dropTableIfExists("test");
        self::$event->execute();
        self::$event->createTable(
            'test',
            [
                'id'    => ['integer', 'auto_increment', 'primary key', 'not null'],
                'name'  => ['varchar(20)'],
            ]
        );
        self::$event->execute();
        self::$event->insert(
            'test',
            ['name']
        );
        self::$event->execute([self::NAME]);
    }

    public function testGetNameFromDatabase()
    {
        $res = self::$event->getNameFromDatabase();
        $exp = self::NAME;
        $this->assertEquals($res, $exp, "The name does not match name from db.");
    }


    public function testGetMonth(){
        $calendar = new \Anax\Calendar\CCalendar();
        $res = $calendar->getMonth();
        $exp = "06";

        $this->assertEquals($res, $exp, "The name does not match.");
    }

}
<commit_msg>Updates<commit_after><?php
namespace qcode\eventCalendar;
use Mos\Database;
/**
 * A testclass
 *
 */
class EventDatabase extends \Mos\Database\CDatabaseBasic{

    /**
     * My name is - from database.
     *
     * @return string
     *
     */
    public function getNameFromDatabase()
    {
        $this->select("name")
            ->from("test")
            ->where("id = ?")
        ;

        $res = $this->executeFetchAll([1]);
        $name = isset($res[0]->name) ? $res[0]->name : false;
        return $name;
    }

}

class EventCalendarTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @test
     *
     */

    static private $event;
    const NAME =  "test";

    /**
     * setUpBeforeClass, called once for all tests in this class.
     *
     * @return void
     *
     */
    public static function setUpBeforeClass()
    {
        self::$event = new EventDatabase();
        self::$event->setOptions(['dsn' => 'sqlite::memory:', "verbose" => false]);
        self::$event->connect();
        self::$event->dropTableIfExists("test");
        self::$event->execute();
        self::$event->createTable(
            'test',
            [
                'id'    => ['integer', 'auto_increment', 'primary key', 'not null'],
                'name'  => ['varchar(20)'],
            ]
        );
        self::$event->execute();
        self::$event->insert(
            'test',
            ['name']
        );
        self::$event->execute([self::NAME]);
    }

    public function testGetNameFromDatabase()
    {
        $res = self::$event->getNameFromDatabase();
        $exp = self::NAME;
        $this->assertEquals($res, $exp, "The name does not match name from db.");
    }


    public function testGetMonth(){
        $calendar = new \Anax\Calendar\CCalendar();
        $res = $calendar->getMonth();
        $exp = "06";

        $this->assertEquals($res, $exp, "The name does not match.");
    }

}

{'fraction_non_alphanumeric': 0.16800622245268343, 'fraction_numerical': 0.003629764065335753, 'mean_word_length': 1.9249431387414708, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '487739', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1142, 'n_words': 234}