/** * @group large */ public function testMint1() { #$this->markTestIncomplete('This test has not been implemented yet.'); #$this->assertTrue(true); return; $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(5); $hashcash->setDate('140422'); $hashcash->setResource('mint2'); $hashcash->setSalt('0000000c4c51ffcfc37b523'); $this->assertEquals('1:5:140422:mint2::0000000c4c51ffcfc37b523:3', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(7); $hashcash->setDate('140422'); $hashcash->setResource('mint2'); $hashcash->setExtension('ext2'); $hashcash->setSalt('salt2'); $this->assertEquals('1:7:140422:mint2:ext2:salt2:13', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(6); $hashcash->setDate('870221'); $hashcash->setResource('thefox'); $hashcash->setSalt('SNIrgHNPdcH3NNu+0CcG8g=='); $this->assertEquals('1:6:870221:thefox::SNIrgHNPdcH3NNu+0CcG8g==:45', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(6); $hashcash->setDate('8702210958'); $hashcash->setResource('thefox'); $hashcash->setSalt('sPc4d5G2UZpTuTmyfOy6IA=='); $this->assertEquals('1:6:8702210958:thefox::sPc4d5G2UZpTuTmyfOy6IA==:13', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(5); $hashcash->setDate('870221095824'); $hashcash->setResource('thefox'); $hashcash->setSalt('lN4IGUU6R5FH27OhM+DGkw=='); $this->assertEquals('1:5:870221095824:thefox::lN4IGUU6R5FH27OhM+DGkw==:14', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(5); $hashcash->setDate('140401'); $hashcash->setResource('thefox'); $hashcash->setSalt('GeUosqsUPpxts37XWLeWdg=='); $this->assertEquals('1:5:140401:thefox::GeUosqsUPpxts37XWLeWdg==:1', $hashcash->mint()); $hashcash = new Hashcash(); $hashcash->setVersion(1); $hashcash->setBits(5); $hashcash->setDate('140325'); $hashcash->setResource('thefox'); $hashcash->setSalt('Ifr62IiXO9YHQ2tXyqSOUQ=='); $this->assertEquals('1:5:140325:thefox::Ifr62IiXO9YHQ2tXyqSOUQ==:5', $hashcash->mint()); $this->assertEquals('01d106345750ab94a8d80e1c0dbe0da3662d476e', $hashcash->getHash()); }