/**
  * @covers Veles\Validators\ByteValidator::format
  * @group  Validators
  * @see	   ByteValidator::format()
  * @dataProvider formatProvider
  */
 public function testFormat($size, $expected)
 {
     $result = $this->object->format($size);
     $msg = 'Wrong ByteValidator::format() result';
     $this->assertSame($expected, $result, $msg);
 }
Example #2
0
 /**
  * Get string with memory statistic
  *
  * @return string
  */
 public function getMemString()
 {
     $mem = ByteValidator::format(call_user_func($this->mem_usage_func));
     $max_mem = ByteValidator::format(call_user_func($this->mem_peak_func));
     return " | Mem: {$mem} | Max: {$max_mem}";
 }