The current tests for Media contain some outdated code and could use a few improvements to coding standards.

I'd like to expand the Media test coverage and I think a minor cleanup would be a good starting point.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Status: Active » Needs review
FileSize
6.46 KB

A patch to cleanup the existing tests.

Notes:

  • Coding standards improvements.
  • Removed variable_set('simpletest_verbose', TRUE); which should always be true by default.
  • Removed commented out $type->view_mode_defaults which is not used by media types.
  • Removed unnecessary 'dependencies' => array('file_entity'),.
  • Removed unused function testViewModesAssigned().

Status: Needs review » Needs work

The last submitted patch, cleanup-tests-1733960-1.patch, failed testing.

Devin Carlson’s picture

Status: Needs work » Needs review
FileSize
6.48 KB

Updated patch which enables file entity in parent::setUp().

Status: Needs review » Needs work

The last submitted patch, cleanup-tests-1733960-3.patch, failed testing.

Devin Carlson’s picture

Status: Needs work » Needs review
FileSize
6.84 KB

It looks like there are more problems at hand.

I don't think that the testbot is currently picking up any valid tests (see the latest Media 7.x-2.x HEAD http://qa.drupal.org/pifr/test/158824).

Status: Needs review » Needs work

The last submitted patch, cleanup-tests-1733960-5.patch, failed testing.

Dave Reid’s picture

ParisLiakos’s picture

Status: Needs work » Needs review

#5: cleanup-tests-1733960-5.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, cleanup-tests-1733960-5.patch, failed testing.

Devin Carlson’s picture

Status: Needs work » Needs review

#1: cleanup-tests-1733960-1.patch queued for re-testing.

Devin Carlson’s picture

The patch in #1 should now pass tests and is the one to review.

ParisLiakos’s picture

Status: Needs review » Fixed

Thanks Devin, couldnt find anything wrong:)
commited

Took it a while, i hope you still want to expand tests cheers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.