public function SharethisViewsPluginTest::testHandlers in ShareThis 8.2
Tests the handlers.
File
- tests/
src/ Functional/ Views/ SharethisViewsPluginTest.php, line 62
Class
- SharethisViewsPluginTest
- Tests the sharethis links appearing on node.
Namespace
Drupal\Tests\sharethis\Functional\ViewsCode
public function testHandlers() {
$this
->drupalCreateNode();
$this
->drupalCreateNode();
// Test the sharethis field.
$view = Views::getView('test_sharethis');
$view
->setDisplay('page_1');
$this
->executeView($view);
$this
->assertEqual(count($view->result), 2);
$this
->drupalGet('test-sharethis');
$result = $this
->xpath('//div[@class=:class]', [
':class' => 'sharethis-wrapper',
]);
$this
->assertEqual(count($result), 2, 'Sharethis links found');
}