Skip to content

Commit

Permalink
FixtureLoader to Loadable
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Apr 17, 2015
1 parent 56f79db commit fb97322
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion spec/loader/ArtLoader.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$this->prophet = new Prophet();

$loader = $this->prophet->prophesize('holyshared\fixture\FixtureLoader');
$loader = $this->prophet->prophesize('holyshared\fixture\Loadable');
$loader->load($this->template, $this->values)->willReturn("<green>foo</green>\n");

$this->loader = new ArtLoader($loader->reveal());
Expand Down
2 changes: 1 addition & 1 deletion spec/loader/CacheLoader.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$this->template = __DIR__ . '/../fixtures/static.txt';
$this->prophet = new Prophet();

$loader = $this->prophet->prophesize('holyshared\fixture\FixtureLoader');
$loader = $this->prophet->prophesize('holyshared\fixture\Loadable');
$loader->load($this->template, [])
->willReturn("static\n")
->shouldBeCalledTimes(1);
Expand Down
2 changes: 1 addition & 1 deletion spec/loader/MustacheLoader.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'name' => 'foo'
];
$this->prophet = new Prophet();
$loader = $this->prophet->prophesize('holyshared\fixture\FixtureLoader');
$loader = $this->prophet->prophesize('holyshared\fixture\Loadable');
$loader->load($this->template, $this->values)->willReturn('{{name}}');

$this->loader = new MustacheLoader($loader->reveal());
Expand Down
3 changes: 2 additions & 1 deletion src/loader/ArtLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace holyshared\fixture\loader;

use holyshared\fixture\Loadable;
use holyshared\fixture\FixtureLoader;
use League\CLImate\CLImate;
use League\CLImate\Util\Output;
Expand All @@ -28,7 +29,7 @@ public function getName()
return 'art';
}

public function __construct(FixtureLoader $loader)
public function __construct(Loadable $loader)
{
$this->output = new Output();
$this->output->sameLine();
Expand Down
5 changes: 3 additions & 2 deletions src/loader/CacheLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace holyshared\fixture\loader;

use holyshared\fixture\Loadable;
use holyshared\fixture\FixtureLoader;
use Collections\Dictionary;

Expand All @@ -29,9 +30,9 @@ final class CacheLoader implements FixtureLoader
private $caches;

/**
* @param \holyshared\fixture\FixtureLoader
* @param \holyshared\fixture\Loadable
*/
public function __construct(FixtureLoader $loader)
public function __construct(Loadable $loader)
{
$this->loader = $loader;
$this->caches = new Dictionary();
Expand Down
3 changes: 2 additions & 1 deletion src/loader/MustacheLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace holyshared\fixture\loader;

use holyshared\fixture\Loadable;
use holyshared\fixture\FixtureLoader;
use Mustache_Engine;

Expand All @@ -28,7 +29,7 @@ public function getName()
return static::NAME;
}

public function __construct(FixtureLoader $loader)
public function __construct(Loadable $loader)
{
$this->loader = $loader;
$this->mustache = new Mustache_Engine();
Expand Down

0 comments on commit fb97322

Please sign in to comment.