/** * @covers ::postCreate */ public function testPostCreate() { // This method is internal, so check for errors on calling it only. $storage = $this->getMock('\\Drupal\\Core\\Entity\\EntityStorageInterface'); // Our mocked entity->postCreate() returns NULL, so assert that. $this->assertNull($this->entity->postCreate($storage)); }