about summary refs log tree commit diff stats
path: root/tests_integration/CoverHandlerTest.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-05-28 06:59:47 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-05-28 06:59:47 +0300
commit78bfc53e084afddcff6450173ae594ee8df279ac (patch)
treeab29a1be6b046e61306393112fb65cc2c9e9d12d /tests_integration/CoverHandlerTest.php
parent69b46e2fd39294d347206edd8b4ea01b749bdb51 (diff)
downloadthe-epube-78bfc53e084afddcff6450173ae594ee8df279ac.tar.gz
the-epube-78bfc53e084afddcff6450173ae594ee8df279ac.tar.xz
try setting content-type conditionally, remove duplicate testcase code
Diffstat (limited to 'tests_integration/CoverHandlerTest.php')
-rw-r--r--tests_integration/CoverHandlerTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests_integration/CoverHandlerTest.php b/tests_integration/CoverHandlerTest.php
index d0fc37c..e1c8c17 100644
--- a/tests_integration/CoverHandlerTest.php
+++ b/tests_integration/CoverHandlerTest.php
@@ -28,10 +28,10 @@ final class CoverHandlerTest extends ApiTestCase
 		]);
 		$this->assertEquals(200, $status);
 
-		[$status, $body, $headers] = $this->postRaw($this->apiUrl, [
+		[$status, $body, $headers] = $this->post($this->apiUrl, [
 			'op' => 'cover',
 			'id' => 2, // Adventures of Huckleberry Finn
-		]);
+		], false);
 
 		$this->assertEquals(200, $status);
 		$this->assertStringContainsString('image/jpeg', $headers['Content-type'] ?? '');
@@ -50,10 +50,10 @@ final class CoverHandlerTest extends ApiTestCase
 		]);
 		$this->assertEquals(200, $status);
 
-		[$status, $body, $headers] = $this->postRaw($this->apiUrl, [
+		[$status, $body, $headers] = $this->post($this->apiUrl, [
 			'op' => 'cover',
 			'id' => 3,
-		]);
+		], false);
 
 		print_r($headers);
 
@@ -116,10 +116,10 @@ final class CoverHandlerTest extends ApiTestCase
 		]);
 		$this->assertEquals(200, $status);
 
-		[$status, $body, $headers] = $this->postRaw($this->apiUrl, [
+		[$status, $body, $headers] = $this->post($this->apiUrl, [
 			'op' => 'cover',
 			'id' => 0,
-		]);
+		], false);
 
 		$this->assertEquals(404, $status);
 	}
@@ -134,10 +134,10 @@ final class CoverHandlerTest extends ApiTestCase
 		]);
 		$this->assertEquals(200, $status);
 
-		[$status, $body, $headers] = $this->postRaw($this->apiUrl, [
+		[$status, $body, $headers] = $this->post($this->apiUrl, [
 			'op' => 'cover',
 			'id' => -1,
-		]);
+		], false);
 
 		$this->assertEquals(404, $status);
 	}