diff --git a/src/Tests/FlagResetTest.php b/src/Tests/FlagResetTest.php index 146a588..3f88d2c 100644 --- a/src/Tests/FlagResetTest.php +++ b/src/Tests/FlagResetTest.php @@ -10,7 +10,7 @@ use Drupal\flag\Tests\FlagTestBase; use Drupal\node\Entity\Node; /** - * Test resetting a flag. + * Test resetting a flag through the user interface. * * @group flag */ @@ -33,7 +33,7 @@ class FlagResetTest extends FlagTestBase { /** * The entity query service. * - * @var \TODO + * @var \Drupal\Core\Entity\Query\QueryFactory */ protected $entityQueryManager; @@ -89,7 +89,7 @@ class FlagResetTest extends FlagTestBase { /** * Tests that counts are kept in sync and can be retrieved. */ - public function testFlagResetUi() { + public function testFlagResetUI() { // Flag the node. $this->flagService->flag($this->flag, $this->node, $this->adminUser); @@ -104,9 +104,9 @@ class FlagResetTest extends FlagTestBase { // Go to the reset form for the flag. $this->drupalGet('flag/reset/' . $this->flag->id()); - $this->assertText(t('Are you sure you want to reset the Flag')); + $this->assertText($this->t('Are you sure you want to reset the Flag')); - $this->drupalPostForm(NULL, [], t('Reset')); + $this->drupalPostForm(NULL, [], $this->t('Reset')); $ids_after = $this->entityQueryManager->get('flagging') ->condition('flag_id', $this->flag->id()) @@ -117,6 +117,4 @@ class FlagResetTest extends FlagTestBase { $this->assertEqual(count($ids_after), 0, "The flag has no flaggings after being reset."); } - // TODO: test the API directly too? - }