add enzyme/axiom interfaces

use axiom/RepositoryInterface in tests and store music
add axiom/Models/ModelInterface to TuneCollection
This commit is contained in:
2017-10-17 21:56:05 -04:00
parent 0cc8361929
commit 4ac9707184
7 changed files with 308 additions and 25 deletions

View File

@@ -1,9 +1,11 @@
<?php
namespace Tests\Unit\Memory;
use XaiCorp\AbcParser\Interfaces\Repository;
use XaiCorp\AbcParser\Models\Memory\Abc;
use XaiCorp\AbcParser\Models\Memory\Person;
use XaiCorp\AbcParser\Parser as AbcParser;
use Enzyme\Axiom\Repositories\RepositoryInterface;
class AbcParserTest extends \Codeception\TestCase\Test
{
@@ -12,7 +14,11 @@ class AbcParserTest extends \Codeception\TestCase\Test
public function setUp()
{
parent::setup();
$this->facade = new AbcParser(new Abc());
$repository = \Mockery::mock(RepositoryInterface::class)
->shouldReceive('add')->once()
->getMock();
$this->facade = new AbcParser(new Abc($repository));
}
private function getValidAbc($filename = '/abc/valid_abc_1.abc')