You are here

public function BiblioContributorWebTestCase::testFormatting in Bibliography Module 7

Test formatting functions.

File

tests/BiblioContributorWebTestCase.test, line 107

Class

BiblioContributorWebTestCase
Web tests for contributor functions.

Code

public function testFormatting() {
  $random = $this
    ->randomName();
  $author = (object) array(
    'cid' => $random,
  );
  require_once __DIR__ . '/../includes/biblio.pages.inc';
  $link = _biblio_author_edit_links($author);
  $this
    ->assertTrue(preg_match(',^<a href="/.+/authors/' . $random . '/edit"> \\[edit\\]</a>$,', $link), '_biblio_author_edit_links() returns valid link.');
}