public function testChecksumMD5() { if ($this->atmosMajorMinor < 2.1) { $this->markTestSkipped("Requires Atmos >= 2.1.0"); return; } $ck = new Checksum('MD5'); $ck->update($this->CHECK_STRING_1); PHPUnit_Framework_Assert::assertEquals('MD5' . $this->CHECK_STRING_1_OFFSET . $this->CHECK_STRING_1_MD5, "{$ck}", "value of 'checksum' wrong"); // Incremental $ck = new Checksum('MD5'); $ck->update($this->CHECK_STRING_1a); PHPUnit_Framework_Assert::assertEquals($this->CHECK_STRING_1a_MD5, $ck->getHashValue()); $ck->update($this->CHECK_STRING_1b); PHPUnit_Framework_Assert::assertEquals($this->CHECK_STRING_1_MD5, $ck->getHashValue()); PHPUnit_Framework_Assert::assertEquals('MD5' . $this->CHECK_STRING_1_OFFSET . $this->CHECK_STRING_1_MD5, "{$ck}", "value of 'checksum' wrong"); }