<commit_before><?php

class DayTest extends CalendarTestCase {
    public function testShouldNotBeCreatedWithoutADate() {
        $this->setExpectedException('InvalidArgumentException');
        new OrangeCubed\Calendar\Day();
    }

    public function testShouldNotBeCreatedWithoutNumericalArguments() {
        $this->setExpectedException('InvalidArgumentException');
        new OrangeCubed\Calendar\Day('foo', 'bar', 'baz');
    }

    public function testShouldBeCreatedWithStringNumbers() {
        $day = new OrangeCubed\Calendar\Day('1', '2', '3');
        $this->assertNotNull($day);
    }

    public function testShouldBeCreatedWithIntegers() {
        $day = new OrangeCubed\Calendar\Day(1, 2, 3);
        $this->assertNotNull($day);
    }

    public function testShouldIndicateFirstDayOfTheWeek() {
        $day = new OrangeCubed\Calendar\Day(24, 1, 2011);
        $this->assertTrue($day->is_first_day_of_week);
    }

    public function testShouldIndicateLastDayOfTheWeek() {
        $day = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertTrue($day->is_last_day_of_week);
    }

    public function testShouldIndicateWeekday() {
        $friday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $saturday = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $monday = new OrangeCubed\Calendar\Day(24, 1, 2011);
        $this->assertTrue($friday->is_weekday);
        $this->assertFalse($saturday->is_weekday);
        $this->assertTrue($monday->is_weekday);
    }

    public function testShouldIndicateWeekend() {
        $friday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $saturday = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $sunday = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertFalse($friday->is_weekend);
        $this->assertTrue($saturday->is_weekend);
        $this->assertTrue($sunday->is_weekend);
    }

    public function testShouldIndicateToday() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $yesterday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $this->assertTrue($today->is_today);
        $this->assertFalse($yesterday->is_today);
    }

    public function testShouldIndicatePast() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $yesterday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $this->assertTrue($yesterday->is_past);
        $this->assertFalse($today->is_past);
    }

    public function testShouldIndicateFuture() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $tomorrow = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertTrue($tomorrow->is_future);
        $this->assertFalse($today->is_future);
    }

    public function testShouldIndicateEvents() {

    }
}
<commit_msg>Added has_event test<commit_after><?php

class DayTest extends CalendarTestCase {
    public function testShouldNotBeCreatedWithoutADate() {
        $this->setExpectedException('InvalidArgumentException');
        new OrangeCubed\Calendar\Day();
    }

    public function testShouldNotBeCreatedWithoutNumericalArguments() {
        $this->setExpectedException('InvalidArgumentException');
        new OrangeCubed\Calendar\Day('foo', 'bar', 'baz');
    }

    public function testShouldBeCreatedWithStringNumbers() {
        $day = new OrangeCubed\Calendar\Day('1', '2', '3');
        $this->assertNotNull($day);
    }

    public function testShouldBeCreatedWithIntegers() {
        $day = new OrangeCubed\Calendar\Day(1, 2, 3);
        $this->assertNotNull($day);
    }

    public function testShouldIndicateFirstDayOfTheWeek() {
        $day = new OrangeCubed\Calendar\Day(24, 1, 2011);
        $this->assertTrue($day->is_first_day_of_week);
    }

    public function testShouldIndicateLastDayOfTheWeek() {
        $day = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertTrue($day->is_last_day_of_week);
    }

    public function testShouldIndicateWeekday() {
        $friday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $saturday = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $monday = new OrangeCubed\Calendar\Day(24, 1, 2011);
        $this->assertTrue($friday->is_weekday);
        $this->assertFalse($saturday->is_weekday);
        $this->assertTrue($monday->is_weekday);
    }

    public function testShouldIndicateWeekend() {
        $friday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $saturday = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $sunday = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertFalse($friday->is_weekend);
        $this->assertTrue($saturday->is_weekend);
        $this->assertTrue($sunday->is_weekend);
    }

    public function testShouldIndicateToday() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $yesterday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $this->assertTrue($today->is_today);
        $this->assertFalse($yesterday->is_today);
    }

    public function testShouldIndicatePast() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $yesterday = new OrangeCubed\Calendar\Day(28, 1, 2011);
        $this->assertTrue($yesterday->is_past);
        $this->assertFalse($today->is_past);
    }

    public function testShouldIndicateFuture() {
        $today = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $tomorrow = new OrangeCubed\Calendar\Day(30, 1, 2011);
        $this->assertTrue($tomorrow->is_future);
        $this->assertFalse($today->is_future);
    }

    public function testShouldIndicateEvents() {
        $day = new OrangeCubed\Calendar\Day(29, 1, 2011);
        $this->assertFalse($day->has_event);
        $event = (object)array('category' => 'foo');
        $day->setEvents(array($event));
        $this->assertTrue($day->has_event);
    }
}

{'fraction_non_alphanumeric': 0.13899414398897691, 'fraction_numerical': 0.037030657940062, 'mean_word_length': 3.2479882955376738, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 73, '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': '6242823', 'n_tokens_mistral': 2026, 'n_tokens_neox': 1803, 'n_words': 303}