You are here

private function PublicationDateTestCase::_getPubdateFieldValue in Publication Date 7.2

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

Returns the value of our published-at field.

Return value

string Value of published_at field.

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 187
Publication Date module tests.

Class

PublicationDateTestCase
Test publication date functionality.

Code

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