public function testFromArray() { $currency = new Currency(840, 'USD', 'US Dollar', 2); $encoder = new CurrencyArrayEncoder(); $this->assertEquals($currency, $encoder->fromArray([840, 'USD', 'US Dollar', 2])); }