<commit_before><?php

/*
 * This file is part of the Carbon package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Carbon\Carbon;

class DayOfWeekModifiersTest extends TestFixture
{
   public function testStartOfWeek()
   {
       $d = Carbon::createFromDate(1980, 8, 7)->startOfWeek();
       $this->assertCarbon($d, 1980, 8, 4, 0, 0, 0);
   }

   public function testStartOfWeekFromWeekStart()
   {
       $d = Carbon::createFromDate(1980, 8, 4)->startOfWeek();
       $this->assertCarbon($d, 1980, 8, 4, 0, 0, 0);
   }

   public function testEndOfWeek()
   {
       $d = Carbon::createFromDate(1980, 8, 7)->endOfWeek();
       $this->assertCarbon($d, 1980, 8, 10, 23, 59, 59);
   }

   public function testEndOfWeekFromWeekEnd()
   {
       $d = Carbon::createFromDate(1980, 8, 9)->endOfWeek();
       $this->assertCarbon($d, 1980, 8, 10, 23, 59, 59);
   }

   public function testNext()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next();
      $this->assertCarbon($d, 1975, 5, 28, 0, 0, 0);
   }

   public function testNextMonday()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next(Carbon::MONDAY);
      $this->assertCarbon($d, 1975, 5, 26, 0, 0, 0);
   }

   public function testNextSaturday()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next(6);
      $this->assertCarbon($d, 1975, 5, 24, 0, 0, 0);
   }

   public function testNextTimestamp()<commit_msg>Being a little more specific to ensure the time is also updated.  Unnecessary unless you ran this test at precisely 00:00:00 which is possible.<commit_after><?php

/*
 * This file is part of the Carbon package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Carbon\Carbon;

class DayOfWeekModifiersTest extends TestFixture
{
   public function testStartOfWeek()
   {
       $d = Carbon::create(1980, 8, 7, 12, 11, 9)->startOfWeek();
       $this->assertCarbon($d, 1980, 8, 4, 0, 0, 0);
   }

   public function testStartOfWeekFromWeekStart()
   {
       $d = Carbon::createFromDate(1980, 8, 4)->startOfWeek();
       $this->assertCarbon($d, 1980, 8, 4, 0, 0, 0);
   }

   public function testEndOfWeek()
   {
       $d = Carbon::create(1980, 8, 7, 11, 12, 13)->endOfWeek();
       $this->assertCarbon($d, 1980, 8, 10, 23, 59, 59);
   }

   public function testEndOfWeekFromWeekEnd()
   {
       $d = Carbon::createFromDate(1980, 8, 9)->endOfWeek();
       $this->assertCarbon($d, 1980, 8, 10, 23, 59, 59);
   }

   public function testNext()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next();
      $this->assertCarbon($d, 1975, 5, 28, 0, 0, 0);
   }

   public function testNextMonday()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next(Carbon::MONDAY);
      $this->assertCarbon($d, 1975, 5, 26, 0, 0, 0);
   }

   public function testNextSaturday()
   {
      $d = Carbon::createFromDate(1975, 5, 21)->next(6);
      $this->assertCarbon($d, 1975, 5, 24, 0, 0, 0);
   }

   public function testNextTimestamp()
{'fraction_non_alphanumeric': 0.15701171256726812, 'fraction_numerical': 0.08135485913263692, 'mean_word_length': 3.185430463576159, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 37, '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': '7199510', 'n_tokens_mistral': 1345, 'n_tokens_neox': 1068, 'n_words': 304}