public function OnlyOneTest::testSetFormatter in Allow a content type only once (Only One) 8
Tests the setFormatter() method.
@covers ::setFormatter @dataProvider providerSetFormatter
Parameters
\Drupal\onlyone\OnlyOnePrintStrategyInterface $formatter: The formatter type.
File
- tests/
src/ Unit/ OnlyOneTest.php, line 793
Class
- OnlyOneTest
- Tests the OnlyOne class methods.
Namespace
Drupal\Tests\onlyone\UnitCode
public function testSetFormatter(OnlyOnePrintStrategyInterface $formatter) {
// Testing the function.
$this
->assertEquals($this->onlyOne, $this->onlyOne
->setFormatter($formatter));
}