Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Avoid Attempted to call an undefined method named "getName" #36

Closed
wants to merge 1 commit into from
Closed

Conversation

StephanePate
Copy link
Contributor

@StephanePate StephanePate commented Jun 5, 2016

Happens when following /admin/dashboard path to visualize SonataAdmin dashboard with SonataDashboardBundle installed.
The override of toString() has to test first that the getName method exists for the $object.

Happens when following /admin/dasboard path to visualize SonataAdmin dashboard with SonataDashboardBundle installed
The override of toString has to test first that the getName exists for the $object.
@OskarStark
Copy link
Member

Can you please add tests?

@StephanePate
Copy link
Contributor Author

There is currently no BlockAdminTest class, neither in SonataDashboardBundle nor in SonataPageBundle I could complement ... and the proposed evolution is a test in itself, no ?!

return (string) $object->getName();
}

return parent::toString($object);
Copy link
Contributor

Choose a reason for hiding this comment

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

The indention is supposed to be 4 spaces.

@greg0ire
Copy link
Contributor

greg0ire commented Jun 6, 2016

and the proposed evolution is a test in itself, no ?!

Uuuuh… no? I mean it is not a unit test…

@StephanePate
Copy link
Contributor Author

Yes, just joking ! As mentioned, there is currently no unit test classes for BlockAdmin as a whole ...

@OskarStark
Copy link
Member

Yes, just joking ! As mentioned, there is currently no unit test classes for BlockAdmin as a whole ...

Would you create one? @stphnpt

@greg0ire
Copy link
Contributor

greg0ire commented Jun 6, 2016

Would you create one? @stphnpt

Yes please create one, it should not be that hard. sorry there are no tests for this class yet, but someone has to start…

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants