* [ADD] Unit testing. Work in progress

* [ADD] Added trasient data collection to context
* [MOD] Code refactoring and minor bugfixes
This commit is contained in:
nuxsmin
2018-07-03 00:53:51 +02:00
parent 283fc83a6b
commit 02f3498eda
34 changed files with 740 additions and 291 deletions

View File

@@ -25,7 +25,6 @@
namespace SP\Tests\Repositories;
use DI\DependencyException;
use PHPUnit\DbUnit\DataSet\IDataSet;
use SP\Core\Exceptions\ConstraintException;
use SP\DataModel\ItemData;
use SP\DataModel\ItemSearchData;
@@ -56,6 +55,8 @@ class PluginRepositoryTest extends DatabaseTestCase
{
$dic = setupContext();
self::$dataset = 'syspass_plugin.xml';
// Datos de conexión a la BBDD
self::$databaseConnectionData = $dic->get(DatabaseConnectionData::class);
@@ -361,14 +362,4 @@ class PluginRepositoryTest extends DatabaseTestCase
$this->assertEquals(0, $result->getNumRows());
}
/**
* Returns the test dataset.
*
* @return IDataSet
*/
protected function getDataSet()
{
return $this->createMySQLXMLDataSet(RESOURCE_DIR . DIRECTORY_SEPARATOR . 'datasets' . DIRECTORY_SEPARATOR . 'syspass_plugin.xml');
}
}