/**
  * @test
  */
 public function setFilter_TestFilters_ShouldFilterTags()
 {
     $tagName_1 = 'Test Filter 1';
     $tagName_2 = 'Test Filter 2';
     $this->tagManagerPage->addTag($tagName_1);
     $message = $this->tagManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Tag successfully saved') >= 0, 'Tag save should return success');
     $state = $this->tagManagerPage->getState($tagName_1);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->tagManagerPage->addTag($tagName_2);
     $message = $this->tagManagerPage->getAlertMessage();
     $this->assertTrue(strpos($message, 'Tag successfully saved') >= 0, 'Tag save should return success');
     $state = $this->tagManagerPage->getState($tagName_2);
     $this->assertEquals('published', $state, 'Initial state should be published');
     $this->tagManagerPage->changeTagState($tagName_2, 'unpublished');
     $test = $this->tagManagerPage->setFilter('filter_published', 'Unpublished');
     $this->assertFalse($this->tagManagerPage->getRowNumber($tagName_1), 'Tag should not show');
     $this->assertEquals(1, $this->tagManagerPage->getRowNumber($tagName_2), 'Tag should be in row 1');
     $test = $this->tagManagerPage->setFilter('filter_published', 'Published');
     $this->assertFalse($this->tagManagerPage->getRowNumber($tagName_2), 'Tag should not show');
     $this->assertEquals(1, $this->tagManagerPage->getRowNumber($tagName_1), 'Tag should be in row 1');
     $this->tagManagerPage->setFilter('Select Status', 'Select Status');
     $this->tagManagerPage->trashAndDelete($tagName_1);
     $this->tagManagerPage->trashAndDelete($tagName_2);
 }
 /**
  * @test
  */
 public function editTag_ChangeFields_FieldsChanged()
 {
     $salt = rand();
     $tagName = 'Tag' . $salt;
     $Caption = 'Caption' . $salt;
     $alt = 'alt' . $salt;
     $float = 'Right';
     $this->assertFalse($this->tagManagerPage->getRowNumber($tagName), 'Test tag should not be present');
     $this->tagManagerPage->addTag($tagName, $Caption, $alt, $float);
     $this->tagManagerPage->editTag($tagName, array('Caption' => 'new_sample_Caption', 'Alt' => 'Sample_Alt'));
     $values = $this->tagManagerPage->getFieldValues('tagEditPage', $tagName, array('Caption', 'Alt'));
     $this->assertEquals(array('new_sample_Caption', 'Sample_Alt'), $values, 'Actual values should match expected');
     $this->tagManagerPage->trashAndDelete($tagName);
 }