Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
5 / 5
SqliteStorage
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
5 / 5
 __construct(array $configuration)
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
5 / 5
<?php
namespace Tdd;
class SqliteStorage extends PersistentStorage
{
    private $databaseFile;
    public function __construct(array $configuration)
    {
        if (empty($configuration['file']))
        {
            throw new \InvalidArgumentException('Sqlite configuration needs a non-empty file!');
        }
        parent::__construct('sqlite:' . ($this->databaseFile = $configuration['file']));
    }
}