promiseDataProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 16
Ratio 100 %

Importance

Changes 0
Metric Value
dl 16
loc 16
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
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
12
namespace Cubiche\Core\Async\Tests\Units\Promise;
13
14
use Cubiche\Core\Async\Promise\PromiseDeferred;
15
16
/**
17
 * Promise Deferred Tests class.
18
 *
19
 * @author Ivannis Suárez Jerez <[email protected]>
20
 * @author Karel Osorio Ramírez <[email protected]>
21
 */
22
class PromiseDeferredAsPromiseTests extends PromiseInterfaceTestCase
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 View Code Duplication
    protected function promiseDataProvider()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
28
    {
29
        $pending = $this->newDefaultTestedInstance();
30
31
        $fulfilled = $this->newDefaultTestedInstance();
32
        $fulfilled->resolve($this->defaultResolveValue());
33
34
        $rejected = $this->newDefaultTestedInstance();
35
        $rejected->reject($this->defaultRejectReason());
36
37
        return array(
38
            'pending' => array($pending),
39
            'fulfilled' => array($fulfilled),
40
            'rejected' => array($rejected),
41
        );
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getTestedClassName()
48
    {
49
        return PromiseDeferred::class;
50
    }
51
}
52