Skip to content

Conversation

@brunomp
Copy link

@brunomp brunomp commented Jan 25, 2019

Hello,

I created a function that makes an Opengraph from a Json. I did not do the Unity Test because I do not know how to use Atoum.

I needed this function because I saved in the database the Json returned from getArrayCopy() and I need to restore the object afterwards.

What do you think?
Thank you.

@euskadi31
Copy link
Owner

I think it would be better to modify the constructor to take an array as an optional argument.

src/Opengraph/Writer.php

    public function __construct($properties = [])
    {
        parent::__construct();

        if(!empty($properties)) {
           //....
        }
    }

For unit test, we can change to phpunit if it suits you.

@euskadi31
Copy link
Owner

@brunomp see: #10

@euskadi31
Copy link
Owner

I release after merge your PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants