Completed
Push — master ( 298e09...565401 )
by Ivannis Suárez
02:36
created

LoopAdapterTests::testIsTimerActive()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
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\Loop;
12
13
use React\EventLoop\Timer\TimerInterface;
14
15
/**
16
 * Loop Adapter Tests class.
17
 *
18
 * @author Karel Osorio Ramírez <[email protected]>
19
 */
20
class LoopAdapterTests extends LoopTests
21
{
22
    /**
23
     * Test addTimer method.
24
     */
25
    public function testAddTimer()
26
    {
27
        $this->proxyMethodTest('addTimer', array(1, $this->delegateMock()));
28
    }
29
30
    /**
31
     * Test addPeriodicTimer method.
32
     */
33
    public function testAddPeriodicTimer()
34
    {
35
        $this->proxyMethodTest('addPeriodicTimer', array(1, $this->delegateMock()));
36
    }
37
38
    /**
39
     * Test cancelTimer method.
40
     */
41
    public function testCancelTimer()
42
    {
43
        $this->proxyMethodTest('cancelTimer', array($this->newMockInstance(TimerInterface::class)));
44
    }
45
46
    /**
47
     * Test isTimerActive method.
48
     */
49
    public function testIsTimerActive()
50
    {
51
        $this->proxyMethodTest('isTimerActive', array($this->newMockInstance(TimerInterface::class)));
52
    }
53
54
    /**
55
     * Test nextTick method.
56
     */
57
    public function testNextTick()
58
    {
59
        $this->proxyMethodTest('nextTick', array($this->delegateMock()));
60
    }
61
62
    /**
63
     * Test futureTick method.
64
     */
65
    public function testFutureTick()
66
    {
67
        $this->proxyMethodTest('futureTick', array($this->delegateMock()));
68
    }
69
}
70