FulfilledPromiseTests::testConstruct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Cubiche/Async component.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Async\Tests\Units\Promise;
12
13
/**
14
 * Fulfilled Promise Tests class.
15
 *
16
 * @author Karel Osorio Ramírez <[email protected]>
17
 */
18
class FulfilledPromiseTests extends PromiseInterfaceTestCase
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function defaultConstructorArguments()
24
    {
25
        return array($this->defaultResolveValue());
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function promiseDataProvider()
32
    {
33
        return array(
34
            array($this->newDefaultTestedInstance()),
35
        );
36
    }
37
38
    /**
39
     * Test __construct.
40
     */
41
    public function testConstruct()
42
    {
43
        $this
44
            ->exception(function () {
45
                $this->newTestedInstance($this->newDefaultTestedInstance());
46
            })
47
            ->isInstanceOf(\InvalidArgumentException::class)
48
        ;
49
    }
50
}
51