Skip to content
Snippets Groups Projects
Commit 67ca12e1 authored by Demian Katz's avatar Demian Katz
Browse files

Improved test stability.

parent 019f93d6
Branches
Tags
No related merge requests found
...@@ -50,7 +50,7 @@ class User extends Gateway ...@@ -50,7 +50,7 @@ class User extends Gateway
* *
* @param \Zend\Config\Config $config VuFind configuration * @param \Zend\Config\Config $config VuFind configuration
*/ */
public function __construct(\Zend\Config\Config $config = null) public function __construct(\Zend\Config\Config $config)
{ {
parent::__construct('user', 'VuFind\Db\Row\User'); parent::__construct('user', 'VuFind\Db\Row\User');
$this->config = $config; $this->config = $config;
......
...@@ -60,7 +60,11 @@ abstract class DbTestCase extends TestCase ...@@ -60,7 +60,11 @@ abstract class DbTestCase extends TestCase
new \Zend\ServiceManager\Config( new \Zend\ServiceManager\Config(
array( array(
'abstract_factories' => 'abstract_factories' =>
array('VuFind\Db\Table\PluginFactory') array('VuFind\Db\Table\PluginFactory'),
'factories' => array(
'resource' => 'VuFind\Db\Table\Factory::getResource',
'user' => 'VuFind\Db\Table\Factory::getUser',
)
) )
) )
); );
......
...@@ -58,6 +58,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase ...@@ -58,6 +58,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
// Click "add" without selecting anything: // Click "add" without selecting anything:
$updateCart = $page->find('css', '#updateCart'); $updateCart = $page->find('css', '#updateCart');
$this->assertTrue(is_object($updateCart));
$updateCart->click(); $updateCart->click();
$this->assertEquals( $this->assertEquals(
'No items were selected. ' 'No items were selected. '
...@@ -73,6 +74,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase ...@@ -73,6 +74,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
// Open the cart and empty it: // Open the cart and empty it:
$viewCart = $page->find('css', '#viewCart'); $viewCart = $page->find('css', '#viewCart');
$this->assertTrue(is_object($viewCart));
$viewCart->click(); $viewCart->click();
$cartSelectAll = $page->find('css', '#cartCheckboxSelectAll'); $cartSelectAll = $page->find('css', '#cartCheckboxSelectAll');
$cartSelectAll->check(); $cartSelectAll->check();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment