Skip to content

Missing feature, the Iteration is available only on the explicit currencies. #4

@liuggio

Description

@liuggio

Would be great to have the Iteration available also on the calculated currencies,
This test is broken now:

    public function testShouldReturnCHFDuringTheIteration()
    {
        $price = new Price(
            array('USD' => 5),
            array('USD/CHF 1.500')
        );

        $currencies = array();
        foreach ($price as $money) {  // Iteration!!
            $currencies[] = (string) $money->getCurrency();
        }

        $this->assertEquals(array('USD', 'CHF'), $currencies);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions