Improve & fixing Tests

This commit is contained in:
Philipp Holzer 2019-07-04 21:39:49 +02:00
parent 486f139342
commit c293eadb78
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
7 changed files with 76 additions and 63 deletions

View file

@ -252,6 +252,20 @@ abstract class ConfigurationTest extends MockedTest
}
}
/**
* Test the configuration load without result
*/
public function testLoadWrong()
{
$this->configModel->shouldReceive('isConnected')->andReturn(true)->once();
$this->configModel->shouldReceive('load')->withAnyArgs()->andReturn([])->once();
$this->testedConfig = $this->getInstance();
$this->assertInstanceOf(ConfigCache::class, $this->testedConfig->getCache());
$this->assertEmpty($this->testedConfig->getCache()->getAll());
}
/**
* Test the configuration get() and set() methods without adapter
*