put http-header related checks in output buffering
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1063,6 +1063,7 @@ class DomainZonesTest extends TestCase
|
|||||||
{
|
{
|
||||||
global $admin_userdata;
|
global $admin_userdata;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
// get customer
|
// get customer
|
||||||
$json_result = Customers::getLocal($admin_userdata, array(
|
$json_result = Customers::getLocal($admin_userdata, array(
|
||||||
'loginname' => 'test1'
|
'loginname' => 'test1'
|
||||||
@@ -1077,12 +1078,14 @@ class DomainZonesTest extends TestCase
|
|||||||
$result = json_decode($json_result, true);
|
$result = json_decode($json_result, true);
|
||||||
$this->assertTrue($result['data']);
|
$this->assertTrue($result['data']);
|
||||||
$this->assertEquals(200, http_response_code());
|
$this->assertEquals(200, http_response_code());
|
||||||
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCustomerDomainZonesDeleteUnmodified()
|
public function testCustomerDomainZonesDeleteUnmodified()
|
||||||
{
|
{
|
||||||
global $admin_userdata;
|
global $admin_userdata;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
// get customer
|
// get customer
|
||||||
$json_result = Customers::getLocal($admin_userdata, array(
|
$json_result = Customers::getLocal($admin_userdata, array(
|
||||||
'loginname' => 'test1'
|
'loginname' => 'test1'
|
||||||
@@ -1097,5 +1100,6 @@ class DomainZonesTest extends TestCase
|
|||||||
$result = json_decode($json_result, true);
|
$result = json_decode($json_result, true);
|
||||||
$this->assertTrue($result['data']);
|
$this->assertTrue($result['data']);
|
||||||
$this->assertEquals(304, http_response_code());
|
$this->assertEquals(304, http_response_code());
|
||||||
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user