You are here

private function PublicationDateTestCase::_getPubdateFieldValue in Publication Date 7

Same name and namespace in other branches
  1. 7.2 tests/publication_date.test \PublicationDateTestCase::_getPubdateFieldValue()

Returns the value of our published-at field

Return value

string

1 call to PublicationDateTestCase::_getPubdateFieldValue()
PublicationDateTestCase::testActionSavingOnForms in tests/publication_date.test
Test automatic saving of variables via forms

File

tests/publication_date.test, line 166
Publication Date module tests.

Class

PublicationDateTestCase
@file Publication Date module tests.

Code

private function _getPubdateFieldValue() {
  $value = '';
  if ($this
    ->assertField('pubdate', t('Published At field exists'))) {
    $field = reset($this
      ->xpath('//input[@id="edit-pubdate"]'));
    $value = (string) $field['value'];
    return $value;
  }
  return $value;
}