public function testDoGetIfNoneMatchReturnsTrue()
 {
     $request = m::mock('Fideloper\\ConditionalRequest\\Request\\RequestInterface');
     $request->shouldReceive('getIfNoneMatch')->once()->andReturn(array('1234', 'abcd'));
     $request->shouldReceive('getIfModifiedSince')->once()->andReturn(null);
     $conditional = new Conditional($request);
     $conditional->setEtag('aaaa');
     // This will NOT match requests ETag, nor attempts ifModifiedSince
     // True - do get
     $this->assertTrue($conditional->doGet(), 'If None Match returns True, as there was no match');
 }
 public function testDoUpdateIfMatchReturnsTrue()
 {
     $request = m::mock('Fideloper\\ConditionalRequest\\Request\\RequestInterface');
     $request->shouldReceive('getIfMatch')->once()->andReturn('1234');
     $request->shouldReceive('getIfUnmodifiedSince')->once()->andReturn(null);
     // Still asks for this if ETag is false
     $conditional = new Conditional($request);
     $conditional->setEtag('1234');
     // This will match requests ETag
     // True - do update
     $this->assertTrue($conditional->doUpdate(), 'If Match returns True, as there was an ETag match');
 }