* [ADD] Unit testing. Work in progress

* [MOD] Improved Public Links key generation
* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-07-22 19:31:00 +02:00
parent 1bcfb6db49
commit 0f2e4e7119
13 changed files with 1078 additions and 75 deletions

View File

@@ -137,7 +137,7 @@ class PluginRepositoryTest extends DatabaseTestCase
$this->assertEquals(1, $data->getAvailable());
$this->assertEquals(0, $data->getEnabled());
$this->assertEquals(0, self::$repository->getById('Authenticator 2')->getNumRows());
$this->assertEquals(0, self::$repository->getByName('Authenticator 2')->getNumRows());
}
/**
@@ -258,6 +258,16 @@ class PluginRepositoryTest extends DatabaseTestCase
$this->expectException(ConstraintException::class);
self::$repository->create($data);
}
/**
* @depends testGetById
* @throws ConstraintException
* @throws \SP\Core\Exceptions\QueryException
*/
public function testCreateBlank()
{
$this->expectException(ConstraintException::class);
self::$repository->create(new PluginData());
}