Пример #1
0
 /**
  * @test
  */
 public function conversionTest()
 {
     $bc = new Msi('8052');
     $this->assertEquals($bc->withChecksumMod10()->getChecksum(), '3');
     $this->assertEquals($bc->withChecksumMod11()->getChecksum(), '7');
     $this->assertEquals($bc->withChecksumMod1110()->getChecksum(), '71');
     $this->assertEquals($bc->withChecksum2Mod10()->getChecksum(), '39');
     $this->assertEquals($bc->withChecksum2Mod10()->withoutChecksum()->getData(), '8052');
 }
 /**
  * 
  * @param string $data
  * @return bool
  */
 protected function checkData($data)
 {
     if (parent::checkData($data)) {
         return $this->checkLength($data);
     }
 }