/** * Tests checkSign with incorrect ss2 */ public function testCheckSignWithBadSignature() { $this->util->expects($this->once())->method('decodeSafeUrlBase64')->with('encoded-ss2')->will($this->returnValue('bad-ss2')); $this->assertFalse($this->signChecker->checkSign(array('data' => 'encodedData', 'ss1' => 'bad-ss1', 'ss2' => 'encoded-ss2'))); }
/** * Tests checkSign */ public function testCheckSign() { $this->assertTrue($this->signChecker->checkSign(array('data' => 'encodedData', 'ss1' => md5('encodedDatasecret'), 'ss2' => 'bad-ss2'))); $this->assertFalse($this->signChecker->checkSign(array('data' => 'encodedData', 'ss1' => md5('encodedDatasecret1'), 'ss2' => 'bad-ss2'))); }