getMethod('toBytes'); $method->setAccessible(true); $bytes = $method->invokeArgs(null, [$phpString]); $this->assertEquals($size, $bytes); } public function sizeProvider() { return [ ['2k', 0x800], ['1m', 0x100000], ['1M', 0x100000], ['32M',0x2000000], ['1G', 0x40000000], ['0K', 0], ['3000k', 3000 * 1024], ['123', 123], ]; } }