spec/Judopay/Model/CardPaymentSpec.php
public function it_coerces_attributes_into_the_correct_data_type()
    {
        $input = array(
            'yourPaymentMetaData' => (object)array('val' => 'an unexpected string'),
            'judoId'              => 'judo123',
            'amount'              => '123.23',
        );

        $expectedOutput = array(
            'yourPaymentMetaData' => (object)array('val' => 'an unexpected string'),
            'judoId'              => 'judo123',
            'amount'              => 123.23,
        );

        /** @var CardPayment|CardPaymentSpec $this */
        $this->setAttributeValues($input);
        $this->getAttributeValues()->shouldBeLike($expectedOutput);
    }
public function it_coerces_attributes_into_the_correct_data_type()
    {
        $input = array(
            'yourPaymentMetaData' => (object)array('val' => 'an unexpected string'),
            'judoId'              => 'judo123',
            'amount'              => '123.23',
        );

        $expectedOutput = array(
            'yourPaymentMetaData' => (object)array('val' => 'an unexpected string'),
            'judoId'              => 'judo123',
            'amount'              => 123.23,
        );

        /** @var CardPayment|CardPaymentSpec $this */
        $this->setAttributeValues($input);
        $this->getAttributeValues()->shouldBeLike($expectedOutput);
    }
Generic model methods