aboutsummaryrefslogtreecommitdiff
path: root/test/Model/QueryTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/Model/QueryTest.php')
-rw-r--r--test/Model/QueryTest.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/Model/QueryTest.php b/test/Model/QueryTest.php
new file mode 100644
index 0000000..ef6cda7
--- /dev/null
+++ b/test/Model/QueryTest.php
@@ -0,0 +1,42 @@
+<?php
+
+declare(strict_types=1);
+
+namespace AugustOffensive\Model;
+
+use PHPUnit\Framework\TestCase;
+
+/**
+ * @covers Query
+ */
+final class QueryTest extends \PHPUnit\Framework\TestCase
+{
+ public function testCanBeCreated()
+ {
+ $this->assertInstanceOf(
+ Query::class,
+ new Query(array("api", "path"), "GET", array())
+ );
+ }
+
+ public function testHasAccessibleValues()
+ {
+ $path = array("api", "query", "path");
+ $request = "PUT";
+ $content = array("a" => "apple", "b" => "bearing");
+ $query = new Query($path, $request, $content);
+
+ $this->assertEquals(
+ $path,
+ $query->getPath()
+ );
+ $this->assertEquals(
+ $request,
+ $query->getRequest()
+ );
+ $this->assertEquals(
+ $content,
+ $query->getContent()
+ );
+ }
+}