summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/PCurlTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/PCurlTest.php b/test/PCurlTest.php
new file mode 100644
index 0000000..08d191a
--- /dev/null
+++ b/test/PCurlTest.php
@@ -0,0 +1,20 @@
+<?php
+
+require_once (dirname(__FILE__) . '/../src/PCurl.php');
+
+use PurpleCode\PCurl;
+
+class PCurlTest extends PHPUnit_Framework_TestCase {
+
+ public function testShouldGetGooglePage() {
+ // given
+ $cut = new PCurl('https://www.google.com');
+
+ // when
+ $response = $cut->get('/');
+
+ // then
+ $this->assertSelectRegExp('title', '/Google/', 1, $response);
+ }
+
+} \ No newline at end of file