Skip to content

Make sure simple datatable metadata is serialized + some test case changes #13296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2018

Conversation

diosmosis
Copy link
Member

Changes:

  • Make DataTable::$metadata protected so derived classes will end up serializing that property.
  • Allow specifying format in SystemTestCase::runAnyApiTest.
  • Allow specifying test suffix in SystemTestCase::runAnyApiTest.

@diosmosis diosmosis added the Needs Review PRs that need a code review label Aug 15, 2018
@diosmosis diosmosis added this to the 3.7.0 milestone Aug 15, 2018
@@ -308,7 +308,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess
*
* @var array
*/
private $metadata = array();
protected $metadata = array();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe add a comment so nobody will set it to private later "by accident"? Be good to also have a system test for this (if possible)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be doable to have a test

@diosmosis
Copy link
Member Author

@tsteur added test and docs

@diosmosis diosmosis force-pushed the simple-metadata-serialize branch from ced268a to 61f9007 Compare August 20, 2018 22:41
@diosmosis diosmosis force-pushed the simple-metadata-serialize branch from 61f9007 to 07287f2 Compare August 20, 2018 22:43
@mattab mattab modified the milestones: 3.7.0, 3.6.1 Sep 1, 2018
@diosmosis diosmosis merged commit f74db0e into 3.x-dev Sep 6, 2018
@diosmosis diosmosis deleted the simple-metadata-serialize branch September 6, 2018 23:44
diosmosis added a commit that referenced this pull request Sep 20, 2018
…anges (#13296)

* Make DataTable metadata protected so it will be serialized in derived classes.

* Allow SystemTestCase::runAnyApiTest to test any format and use a testSuffix.

* Add test for metadata serialization & note about it in field docs.
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
…anges (matomo-org#13296)

* Make DataTable metadata protected so it will be serialized in derived classes.

* Allow SystemTestCase::runAnyApiTest to test any format and use a testSuffix.

* Add test for metadata serialization & note about it in field docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

3 participants