mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 07:34:09 +01:00
test(IT): Rework output handler exceptions
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -130,5 +130,4 @@ final class Bootstrap extends BootstrapBase
|
||||
return $response;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,6 +94,8 @@ abstract class BootstrapBase implements BootstrapInterface
|
||||
|
||||
if (defined('TEST_ROOT')) {
|
||||
$router->response()->body(__($err_msg) . PHP_EOL . $err->getTraceAsString());
|
||||
|
||||
throw $err;
|
||||
} else {
|
||||
$router->response()->body(__($err_msg));
|
||||
}
|
||||
|
||||
@@ -62,8 +62,10 @@ class IndexControllerTest extends IntegrationTestCase
|
||||
'//div[contains(@id, \'tabs-\')]//form'
|
||||
)->extract(['id']);
|
||||
|
||||
$this->assertNotEmpty($output);
|
||||
$this->assertCount(5, $filter);
|
||||
assert(!empty($output));
|
||||
assert(count($filter) === 5);
|
||||
|
||||
$this->assertTrue(true);
|
||||
});
|
||||
|
||||
$container = $this->buildContainer(
|
||||
|
||||
@@ -62,8 +62,10 @@ class CopyControllerTest extends IntegrationTestCase
|
||||
'//div[@class="data-container"]//form[@name="frmaccount"]|//div[@class="item-actions"]//button'
|
||||
)->extract(['id']);
|
||||
|
||||
$this->assertNotEmpty($output);
|
||||
$this->assertCount(3, $filter);
|
||||
assert(!empty($output));
|
||||
assert(count($filter) === 3);
|
||||
|
||||
$this->assertTrue(true);
|
||||
});
|
||||
|
||||
$container = $this->buildContainer(
|
||||
|
||||
@@ -61,8 +61,10 @@ class CreateControllerTest extends IntegrationTestCase
|
||||
'//div[@class="data-container"]//form[@name="frmaccount" and @data-action-route="account/saveCreate"]|//div[@class="item-actions"]//button'
|
||||
)->extract(['id']);
|
||||
|
||||
$this->assertNotEmpty($output);
|
||||
$this->assertCount(3, $filter);
|
||||
assert(!empty($output));
|
||||
assert(count($filter) === 3);
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -65,8 +65,10 @@ class DeleteControllerTest extends IntegrationTestCase
|
||||
'//div[@class="data-container"]//form[@name="frmaccount" and @data-action-route="account/saveDelete"]|//div[@class="item-actions"]//button'
|
||||
)->extract(['id']);
|
||||
|
||||
$this->assertNotEmpty($output);
|
||||
$this->assertCount(2, $filter);
|
||||
assert(!empty($output));
|
||||
assert(count($filter) === 2);
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -64,8 +64,10 @@ class EditControllerTest extends IntegrationTestCase
|
||||
'//div[@class="data-container"]//form[@name="frmaccount" and @data-action-route="account/saveEdit"]|//div[@class="item-actions"]//button'
|
||||
)->extract(['id']);
|
||||
|
||||
$this->assertNotEmpty($output);
|
||||
$this->assertCount(3, $filter);
|
||||
assert(!empty($output));
|
||||
assert(count($filter) === 3);
|
||||
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -67,4 +67,7 @@
|
||||
<file>../lib/SP/Domain/Config/Adapters/ConfigData.php</file>
|
||||
</exclude>
|
||||
</source>
|
||||
<php>
|
||||
<ini name="zend.assertions" value="1"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
||||
Reference in New Issue
Block a user