From 677953067f2bb5502a70f0d004f1ac844b18a128 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 16 Jan 2017 22:04:43 +0100 Subject: * Facebook support --- .../tests/FileUpload/FacebookFileTest.php | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 lib/facebook-graph-sdk/tests/FileUpload/FacebookFileTest.php (limited to 'lib/facebook-graph-sdk/tests/FileUpload/FacebookFileTest.php') diff --git a/lib/facebook-graph-sdk/tests/FileUpload/FacebookFileTest.php b/lib/facebook-graph-sdk/tests/FileUpload/FacebookFileTest.php new file mode 100644 index 0000000..1eb5c0b --- /dev/null +++ b/lib/facebook-graph-sdk/tests/FileUpload/FacebookFileTest.php @@ -0,0 +1,53 @@ +testFile = __DIR__ . '/../foo.txt'; + } + + public function testCanOpenAndReadAndCloseAFile() + { + $file = new FacebookFile($this->testFile); + $fileContents = $file->getContents(); + + $this->assertEquals('This is a text file used for testing. Let\'s dance.', $fileContents); + } + + /** + * @expectedException \Facebook\Exceptions\FacebookSDKException + */ + public function testTryingToOpenAFileThatDoesntExistsThrows() + { + new FacebookFile('does_not_exist.file'); + } +} -- cgit v1.2.3