public function NodeRevisionGenerateTest::setUp in Node Revision Delete 8
Same name in this branch
- 8 modules/node_revision_generate/tests/src/Functional/NodeRevisionGenerateTest.php \Drupal\Tests\node_revision_generate\Functional\NodeRevisionGenerateTest::setUp()
- 8 modules/node_revision_generate/tests/src/Unit/NodeRevisionGenerateTest.php \Drupal\Tests\node_revision_generate\Unit\NodeRevisionGenerateTest::setUp()
Overrides UnitTestCase::setUp
File
- modules/
node_revision_generate/ tests/ src/ Unit/ NodeRevisionGenerateTest.php, line 44
Class
- NodeRevisionGenerateTest
- Tests the NodeRevisionGenerate class methods.
Namespace
Drupal\Tests\node_revision_generate\UnitCode
public function setUp() {
parent::setUp();
// Time mock.
$this->time = $this
->createMock('Drupal\\Component\\Datetime\\TimeInterface');
// Connection mock.
$this->connection = $this
->createMock('Drupal\\Core\\Database\\Connection');
// Creating the object.
$this->nodeRevisionGenerate = new NodeRevisionGenerate($this->time, $this->connection, $this
->getStringTranslationStub());
}