initOutput(\rcmail_action::MODE_HTTP, 'contacts', 'photo'); $this->assertInstanceOf(\rcmail_action::class, $action); $this->assertTrue($action->checks()); $this->runAndAssert($action, OutputJsonMock::E_EXIT); $result = $output->getOutput(); $this->assertContains('Content-Type: image/gif', $output->headers); $this->assertSame(base64_decode(\rcmail_output::BLANK_GIF, true), $result); $_GET = ['_error' => 1]; $this->runAndAssert($action, OutputJsonMock::E_EXIT); $result = $output->getOutput(); $this->assertContains('HTTP/1.0 204 Photo not found', $output->headers); $this->assertSame('', $result); } /** * Test run() method - a contact with real photo */ public function test_photo() { $this->markTestIncomplete(); } }