@@ 63-69 (lines=7) @@ | ||
60 | } |
|
61 | ||
62 | ||
63 | public function testGet() |
|
64 | { |
|
65 | $this->mock->expects( $this->once() )->method( 'get' ) |
|
66 | ->with( $this->equalTo( 'key' ) )->will( $this->returnValue( 'value' ) ); |
|
67 | ||
68 | $this->assertEquals( 'value', $this->object->get( 'key', 'default' ) ); |
|
69 | } |
|
70 | ||
71 | ||
72 | public function testGetDefault() |
|
@@ 72-78 (lines=7) @@ | ||
69 | } |
|
70 | ||
71 | ||
72 | public function testGetDefault() |
|
73 | { |
|
74 | $this->mock->expects( $this->once() )->method( 'get' ) |
|
75 | ->with( $this->equalTo( 'key' ) )->will( $this->returnValue( null ) ); |
|
76 | ||
77 | $this->assertEquals( 'default', $this->object->get( 'key', 'default' ) ); |
|
78 | } |
|
79 | ||
80 | ||
81 | public function testGetMultiple() |
|
@@ 97-103 (lines=7) @@ | ||
94 | } |
|
95 | ||
96 | ||
97 | public function testSet() |
|
98 | { |
|
99 | $this->mock->expects( $this->once() )->method( 'put' ) |
|
100 | ->with( $this->equalTo( 'key' ), $this->equalTo( 'value' ), $this->greaterThan( 0 ) ); |
|
101 | ||
102 | $this->object->set( 'key', 'value', '2100-01-01 00:00:00', array( 'tag' ) ); |
|
103 | } |
|
104 | ||
105 | ||
106 | public function testSetForever() |
|
@@ 106-112 (lines=7) @@ | ||
103 | } |
|
104 | ||
105 | ||
106 | public function testSetForever() |
|
107 | { |
|
108 | $this->mock->expects( $this->once() )->method( 'forever' ) |
|
109 | ->with( $this->equalTo( 'key' ), $this->equalTo( 'value' ) ); |
|
110 | ||
111 | $this->object->set( 'key', 'value', null, array( 'tag' ) ); |
|
112 | } |
|
113 | ||
114 | ||
115 | public function testSetMultiple() |