<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.
 */

namespace Tests\Carbon;

use Carbon\Carbon;
use Tests\AbstractTestCase;

class CreateSafeTest extends AbstractTestCase
{
    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage second : -1 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForSecondLowerThanZero()
    {
        Carbon::createSafe(null, null, null, null, null, - 1);
    }

    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage second : 60 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForSecondGreaterThan59()
    {
        Carbon::createSafe(null, null, null, null, null, 60);
    }

    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage minute : -1 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForMinuteLowerThanZero()
    {<commit_msg>Add code covergae for \Carbon\Exceptions\InvalidDateException<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.
 */

namespace Tests\Carbon;

use Carbon\Carbon;
use Carbon\Exceptions\InvalidDateException;
use Tests\AbstractTestCase;

class CreateSafeTest extends AbstractTestCase
{
    public function testInvalidDateExceptionProperties()
    {
        $e = new InvalidDateException('day', 'foo');
        $this->assertSame('day', $e->getField());
        $this->assertSame('foo', $e->getValue());
    }

    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage second : -1 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForSecondLowerThanZero()
    {
        Carbon::createSafe(null, null, null, null, null, - 1);
    }

    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage second : 60 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForSecondGreaterThan59()
    {
        Carbon::createSafe(null, null, null, null, null, 60);
    }

    /**
     * @expectedException \Carbon\Exceptions\InvalidDateException
     * @expectedExceptionMessage minute : -1 is not a valid value.
     */
    public function testCreateSafeThrowsExceptionForMinuteLowerThanZero()
    {
{'fraction_non_alphanumeric': 0.09877460081693279, 'fraction_numerical': 0.006683995544002971, 'mean_word_length': 3.4825291181364393, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2246657', 'n_tokens_mistral': 755, 'n_tokens_neox': 733, 'n_words': 201}