- $this->assertEquals('2kiB', human_bytes(2 * 1024));
- $this->assertEquals('2kiB', human_bytes(strval(2 * 1024)));
- $this->assertEquals('2MiB', human_bytes(2 * (pow(1024, 2))));
- $this->assertEquals('2MiB', human_bytes(strval(2 * (pow(1024, 2)))));
- $this->assertEquals('2GiB', human_bytes(2 * (pow(1024, 3))));
- $this->assertEquals('2GiB', human_bytes(strval(2 * (pow(1024, 3)))));
- $this->assertEquals('374B', human_bytes(374));
- $this->assertEquals('374B', human_bytes('374'));
- $this->assertEquals('232kiB', human_bytes(237481));
- $this->assertEquals('Unlimited', human_bytes('0'));
- $this->assertEquals('Unlimited', human_bytes(0));
- $this->assertEquals('Setting not set', human_bytes(''));
+ $this->assertEquals('2'. t('kiB'), human_bytes(2 * 1024));
+ $this->assertEquals('2'. t('kiB'), human_bytes(strval(2 * 1024)));
+ $this->assertEquals('2'. t('MiB'), human_bytes(2 * (pow(1024, 2))));
+ $this->assertEquals('2'. t('MiB'), human_bytes(strval(2 * (pow(1024, 2)))));
+ $this->assertEquals('2'. t('GiB'), human_bytes(2 * (pow(1024, 3))));
+ $this->assertEquals('2'. t('GiB'), human_bytes(strval(2 * (pow(1024, 3)))));
+ $this->assertEquals('374'. t('B'), human_bytes(374));
+ $this->assertEquals('374'. t('B'), human_bytes('374'));
+ $this->assertEquals('232'. t('kiB'), human_bytes(237481));
+ $this->assertEquals(t('Unlimited'), human_bytes('0'));
+ $this->assertEquals(t('Unlimited'), human_bytes(0));
+ $this->assertEquals(t('Setting not set'), human_bytes(''));