From 4b8a9a5189a625bf99fedec7fd31f6e146410a14 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 26 Apr 2018 01:00:12 +0200 Subject: Update FB API library --- .../PersistentData/PersistentDataFactoryTest.php | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 lib/facebook-graph-sdk/tests/PersistentData/PersistentDataFactoryTest.php (limited to 'lib/facebook-graph-sdk/tests/PersistentData/PersistentDataFactoryTest.php') diff --git a/lib/facebook-graph-sdk/tests/PersistentData/PersistentDataFactoryTest.php b/lib/facebook-graph-sdk/tests/PersistentData/PersistentDataFactoryTest.php new file mode 100644 index 0000000..d6206fc --- /dev/null +++ b/lib/facebook-graph-sdk/tests/PersistentData/PersistentDataFactoryTest.php @@ -0,0 +1,68 @@ +assertInstanceOf(self::COMMON_INTERFACE, $persistentDataHandler); + $this->assertInstanceOf($expected, $persistentDataHandler); + } + + /** + * @return array + */ + public function persistentDataHandlerProviders() + { + $handlers = [ + ['memory', self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'], + [new FacebookMemoryPersistentDataHandler(), self::COMMON_NAMESPACE . 'FacebookMemoryPersistentDataHandler'], + [new FacebookSessionPersistentDataHandler(false), self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler'], + [null, self::COMMON_INTERFACE], + ]; + + if (session_status() === PHP_SESSION_ACTIVE) { + $handlers[] = ['session', self::COMMON_NAMESPACE . 'FacebookSessionPersistentDataHandler']; + } + + return $handlers; + } +} -- cgit v1.2.3