Completed
Pull Request — master (#45)
by jesus
02:39
created

CacheTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace FacturaScripts\Core\Base;
4
5
/**
6
 * Generated by PHPUnit_SkeletonGenerator on 2017-07-24 at 16:53:33.
7
 */
8
class CacheTest extends \PHPUnit_Framework_TestCase {
9
10
    /**
11
     * @var Cache
12
     */
13
    protected $object;
14
15
    /**
16
     * Sets up the fixture, for example, opens a network connection.
17
     * This method is called before a test is executed.
18
     */
19
    protected function setUp() {
20
        $this->object = new Cache;
21
    }
22
23
    /**
24
     * Tears down the fixture, for example, closes a network connection.
25
     * This method is called after a test is executed.
26
     */
27
    protected function tearDown() {
28
        
29
    }
30
31
    /**
32
     * @covers FacturaScripts\Core\Base\Cache::get
33
     * @todo   Implement testGet().
34
     */
35
    public function testGet() {
36
        // Remove the following lines when you implement this test.
37
        $this->object->set('TEST', 1234);
38
        $data = $this->object->get('TEST');
39
        $this->assertEquals(1234, $data);
40
    }
41
42
43
    /**
44
     * @covers FacturaScripts\Core\Base\Cache::delete
45
     * @todo   Implement testDelete().
46
     */
47
    public function testDelete() {
48
        // Remove the following lines when you implement this test.
49
        $this->object->set('TEST', 1234);
50
        $this->object->delete('TEST');
51
        $this->assertEmpty($this->object->get('TEST'));
52
    }
53
54
    /**
55
     * @covers FacturaScripts\Core\Base\Cache::clear
56
     * @todo   Implement testClear().
57
     */
58
    public function testClear() {
59
        // Remove the following lines when you implement this test.
60
        $this->object->set('TEST_1', 12345);
61
        $this->object->clear();
62
        $this->assertEmpty($this->object->get('TEST_1'));
63
        
64
    }
65
66
}
67