protected function SimpleFbConnectFbManagerTest::setUp in Simple FB Connect 8.3
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ SimpleFbConnectFbManagerTest.php, line 25
Class
- SimpleFbConnectFbManagerTest
- @coversDefaultClass Drupal\simple_fb_connect\SimpleFbConnectFbManager @group simple_fb_connect
Namespace
Drupal\Tests\simple_fb_connect\UnitCode
protected function setUp() {
parent::setUp();
$this->loggerFactory = $this
->getMock('Drupal\\Core\\Logger\\LoggerChannelFactoryInterface');
$this->eventDispatcher = $this
->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->entityFieldManager = $this
->getMock('Drupal\\Core\\Entity\\EntityFieldManagerInterface');
$this->urlGenerator = $this
->getMock('Drupal\\Core\\Routing\\UrlGeneratorInterface');
$this->persistentDataHandler = $this
->getMockBuilder('Drupal\\simple_fb_connect\\SimpleFbConnectPersistentDataHandler')
->disableOriginalConstructor()
->getMock();
$this->fbManager = new SimpleFbConnectFbManager($this->loggerFactory, $this->eventDispatcher, $this->entityFieldManager, $this->urlGenerator, $this->persistentDataHandler);
$this->facebook = $this
->getMockBuilder('Facebook\\Facebook')
->disableOriginalConstructor()
->getMock();
$this->fbManager
->setFacebookService($this->facebook);
}